The program flags for the standard-specific functionality vs the program arguments were previously stored in the same bit space.
This breaks the two parts into the main program flags and the "feature" flags.
Implement support for new functionality where the Object structure can be optionally preserved.
Implement support for new functionality where the tabbing of the Object can be preserved, even when trimmed.
This is a step towards a "pretty print" mode that is more or less an "original print" mode.
The tabbing structure is now well preserved for standards like FSS Extended List (FSS-0003).
The Object alignment can determined from the Object close.
Use the `closes` structure to identify how the Object end is tabbed.
Then use that tabbing for the Object.
When trimming is enabled, still apply that tabbing.
This is done only for standards where such behavior makes sense.
The original print is now better preserved.
Printing an Object can now print the before and after Object characters (usually white space).
The trimming and original print may be used together to produce the results where the is no white space before or after the Object but everything else from the original source is preserved.
This combination of trim and original essentially ensure that the old behavior can be still produced.
I would further note that the processing of the FSS Embedded List (FSS-0008) Objects is not recursively performed.
No trimming or anything like that is applied at this time.
Only the selected depth is recursed into such that the Object and Content are processed.
I made this decision to keep the design as simple as possible.
Should I get the motivation and the time, then I may at some point in the future decided to recursively process and format all of the embedded structures.
I happened to notice duplicate and unused flags.
These are now removed.
Update the runtime tests accordingly.
Add new runtime tests to test the updated behavior.
I used the 0.6 and 0.7 to test these and I compared the results.
There is a discrepancy in some of 0.6 and 0.7 tests.
I will have to follow this commit with additional test fixes as necessary pending further review.
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_line_single_d | fss_read_main_flag_content_end_d;
- data.setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
+ data.setting.feature |= fss_read_feature_flag_line_single_d;
+ data.setting.feature |= fss_read_feature_flag_quote_content_d | fss_read_feature_flag_quote_object_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_basic_standard_s;
+ data.setting.open_object = f_fss_basic_open_s;
data.callback.process_help = &fss_read_basic_process_help;
data.callback.process_last_line = &fss_read_process_last_line;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
+ data.setting.feature |= fss_read_feature_flag_object_as_line_d;
+ data.setting.feature |= fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_basic_list_standard_s;
+ data.setting.open_object = f_fss_basic_list_open_s;
data.callback.process_help = &fss_read_basic_list_process_help;
data.callback.process_last_line = &fss_read_process_last_line;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_content_has_close_d | fss_read_main_flag_object_trim_d;
- data.setting.flag |= fss_read_main_flag_depth_multiple_d;
+ data.setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_content_has_close_d;
+ data.setting.feature |= fss_read_feature_flag_object_align_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
+ data.setting.feature |= fss_read_feature_flag_depth_multiple_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_embedded_list_standard_s;
+ data.setting.open_object = f_fss_embedded_list_open_s;
data.callback.process_help = &fss_read_embedded_list_process_help;
data.callback.process_last_line = &fss_read_process_last_line;
return;
}
- // @todo this now needs to handle this case: main->setting.flag & fss_read_main_flag_depth_multiple_d and this case main->setting.flag & fss_read_main_flag_select_d.
+ // @todo this now needs to handle this case: main->setting.feature & fss_read_feature_flag_depth_multiple_d and this case main->setting.flag & fss_read_main_flag_select_d.
if (main->setting.buffer.used) {
main->setting.range.start = 0;
#ifndef _di_fss_read_embedded_list_process_normal_determine_depth_
void fss_read_embedded_list_process_normal_determine_depth(fss_read_main_t * const main) {
- if (!main) return;
- if (!main->setting.nest.used || !main->setting.nest.depth[0].used || !main->setting.depths.used) return;
+ if (!main || !main->setting.nest.used || !main->setting.nest.depth[0].used || !main->setting.depths.used) return;
f_number_unsigned_t depth = main->setting.depths.array[0].depth;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_line_single_d | fss_read_main_flag_content_multiple_d | fss_read_main_flag_content_end_d;
- data.setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
+ data.setting.feature |= fss_read_feature_flag_line_single_d | fss_read_feature_flag_content_multiple_d;
+ data.setting.feature |= fss_read_feature_flag_quote_content_d | fss_read_feature_flag_quote_object_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_extended_standard_s;
+ data.setting.open_object = f_fss_extended_open_s;
data.callback.process_help = &fss_read_extended_process_help;
data.callback.process_last_line = &fss_read_process_last_line;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_content_has_close_d | fss_read_main_flag_object_trim_d;
+ data.setting.feature |= fss_read_feature_flag_object_align_d | fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_content_has_close_d;
+ data.setting.feature |= fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_extended_list_standard_s;
+ data.setting.open_object = f_fss_extended_list_open_s;
data.callback.process_help = &fss_read_extended_list_process_help;
data.callback.process_last_line = &fss_read_process_last_line;
#endif // _di_fss_read_allocation_block_d_
/**
+ * Flags not passed to the main function but instead assigned by individual standards to designate how they work.
+ *
+ * fss_read_feature_flag_*_d:
+ * - none: No flags set.
+ * - content_has_close: The Content has a closing character which needs to be counted and handled when processing both Object and Content, but is otherwise not processed or printed.
+ * - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
+ * - depth_multiple: Designate that multiple depths are allowed within Content rather than being single depth Content.
+ * - line_single: Designate that only a single line for Content is allowed for an Object for this standard rather than allowing multiple lines per Content per Object.
+ * - object_align: When printing the Object, align its Object start with the Content close (only useful if there is a Content close character).
+ * - object_as_line: The Object is counted as its own line for the purpose of -l/--line or any other similar behavior.
+ * - object_trim: Empty space before an after Objects are ignored while processing without affecting printing behavior.
+ * - object_trim_expand: Objects should be print all characters (generally white space) before the Object until the line start and after the Object until the line ends or the Object opener (whichever is first or most correct).
+ * - quote_content: Designate that the standard supports quotes on Content.
+ * - quote_object: Designate that the standard supports quotes on Objects.
+ */
+#ifndef _di_fss_read_feature_flag_d_
+ #define fss_read_feature_flag_none_d 0x0
+ #define fss_read_feature_flag_content_has_close_d 0x1
+ #define fss_read_feature_flag_content_multiple_d 0x2
+ #define fss_read_feature_flag_depth_multiple_d 0x4
+ #define fss_read_feature_flag_line_single_d 0x8
+ #define fss_read_feature_flag_object_align_d 0x10
+ #define fss_read_feature_flag_object_as_line_d 0x20
+ #define fss_read_feature_flag_object_trim_d 0x40
+ #define fss_read_feature_flag_object_trim_expand_d 0x80
+ #define fss_read_feature_flag_quote_content_d 0x100
+ #define fss_read_feature_flag_quote_object_d 0x200
+#endif // _di_fss_read_feature_flag_d_
+
+/**
* Flags passed to the main function or program.
*
* fss_read_main_flag_*_d:
* - at: The object at the given position is being selected (Think of this as select a row for some Object).
* - columns: The total columns found and selected is printed instead of the Content.
* - content: The Content is to be printed.
- * - content_end: Print the Content end set even if there is no Content (some standards like FSS-0000 and FSS-0001 require this).
- * - content_has_close: The Content has a closing character which needs to be counted and handled when processing both Object and Content, but is otherwise not processed or printed.
- * - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
* - copyright: Print copyright.
* - delimit: How delimits are to be handled is designated.
* - depth: The depth is specified at least once.
- * - depth_multiple: Designate that multiple depths are allowed within Content rather than being single depth Content.
* - empty: Empty Content will be printed (Objects that have no Content will have their empty Content printed).
* - help: Print help.
* - line: A specific Content at a given line is to be selected (Think of this as select a row for some Content).
- * - line_single: Designate that only a single line for Content is allowed for an Object for this standard rather than allowing multiple lines per Content per Object.
* - name: A specific Object name has been requested.
* - object: The Object is to be printed.
- * - object_as_line: The Object is counted as its own line for the purpose of -l/--line or any other similar behavior.
* - object_content: A helper flag representing object and content flag bits being set.
- * - object_trim: Empty space before an after Objects are ignored while processing without affecting printing behavior.
* - original: Enable original printing, where the quotes are printed and no delimits are applied.
* - payload_create: Create the payload Object with empty Content if the payload Object is missing (when using FSS Payload and related).
* - payload_error: Treat missing or invalid payload as an error (when using FSS Payload and related).
* - payload_warn: Treat missing or invalid payload as a warning (when using FSS Payload and related).
* - pipe: Use the input pipe.
* - pipe_format: Print using the special pipe format.
- * - quote_content: Designate that the standard supports quotes on Content.
- * - quote_object: Designate that the standard supports quotes on Objects.
* - select: A specific Content at a given position is to be selected (Think of this as select a column for some Content).
* - select_content: A helper flag representing select and content flag bits being set.
* - total: The total lines found and selected is printed instead of the Content.
* - trim: Empty space before and after Objects and Content will not be printed (They will be trimmed).
- * - trim_object: Empty space before and after Objects (but not Content) will not be printed (They will be trimmed).
* - version: Print version.
* - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
*/
#define fss_read_main_flag_at_d 0x1
#define fss_read_main_flag_columns_d 0x2
#define fss_read_main_flag_content_d 0x4
- #define fss_read_main_flag_content_end_d 0x8
- #define fss_read_main_flag_content_has_close_d 0x10
- #define fss_read_main_flag_content_multiple_d 0x20
- #define fss_read_main_flag_copyright_d 0x40
- #define fss_read_main_flag_delimit_d 0x80
- #define fss_read_main_flag_depth_d 0x100
- #define fss_read_main_flag_depth_multiple_d 0x200
- #define fss_read_main_flag_empty_d 0x400
- #define fss_read_main_flag_help_d 0x800
- #define fss_read_main_flag_line_d 0x1000
- #define fss_read_main_flag_line_single_d 0x2000
- #define fss_read_main_flag_name_d 0x4000
- #define fss_read_main_flag_object_d 0x8000
- #define fss_read_main_flag_object_as_line_d 0x10000
- #define fss_read_main_flag_object_content_d 0x8004
- #define fss_read_main_flag_object_trim_d 0x20000
- #define fss_read_main_flag_original_d 0x40000
- #define fss_read_main_flag_payload_create_d 0x80000
- #define fss_read_main_flag_payload_error_d 0x100000
- #define fss_read_main_flag_payload_warn_d 0x200000
- #define fss_read_main_flag_pipe_d 0x400000
- #define fss_read_main_flag_pipe_format_d 0x800000
- #define fss_read_main_flag_quote_content_d 0x1000000
- #define fss_read_main_flag_quote_object_d 0x2000000
- #define fss_read_main_flag_select_d 0x4000000
- #define fss_read_main_flag_select_content_d 0x4000004
- #define fss_read_main_flag_total_d 0x8000000
- #define fss_read_main_flag_trim_d 0x10000000
- #define fss_read_main_flag_trim_object_d 0x20000000
- #define fss_read_main_flag_version_d 0x40000000
- #define fss_read_main_flag_version_copyright_help_d 0x40000840
+ #define fss_read_main_flag_copyright_d 0x8
+ #define fss_read_main_flag_delimit_d 0x10
+ #define fss_read_main_flag_depth_d 0x20
+ #define fss_read_main_flag_empty_d 0x40
+ #define fss_read_main_flag_help_d 0x80
+ #define fss_read_main_flag_line_d 0x100
+ #define fss_read_main_flag_name_d 0x200
+ #define fss_read_main_flag_object_d 0x400
+ #define fss_read_main_flag_object_content_d 0x404
+ #define fss_read_main_flag_original_d 0x800
+ #define fss_read_main_flag_payload_create_d 0x1000
+ #define fss_read_main_flag_payload_error_d 0x2000
+ #define fss_read_main_flag_payload_warn_d 0x4000
+ #define fss_read_main_flag_pipe_d 0x8000
+ #define fss_read_main_flag_pipe_format_d 0x10000
+ #define fss_read_main_flag_select_d 0x200000
+ #define fss_read_main_flag_select_content_d 0x200004
+ #define fss_read_main_flag_total_d 0x400000
+ #define fss_read_main_flag_trim_d 0x800000
+ #define fss_read_main_flag_version_d 0x100000
+ #define fss_read_main_flag_version_copyright_help_d 0x100088
#endif // _di_fss_read_main_flag_d_
/**
*
* For all function pointers on this structure, the main variable must be of type fss_read_main_t.
*
+ * feature: Flags not passed to the main function but instead assigned by individual standards to designate how they work.
* flag: Flags passed to the main function.
* delimit_mode: The delimit mode.
*
* depth: The active depth to use.
* depths: The array of parameters for each given depth.
*
- * standard: A human-friendly string describing the standard in use, such as "FSS-0000 (Basic)".
- * buffer: The buffer containing all loaded files (and STDIN pipe).
+ * standard: A human-friendly string describing the standard in use, such as "FSS-0000 (Basic)".
+ * open_object: The Object open character used by the particular standard.
+ * buffer: The buffer containing all loaded files (and STDIN pipe).
*
* comments: The positions within the buffer representing comments.
* contents: The positions within the buffer representing Contents.
*/
#ifndef _di_fss_read_setting_t_
typedef struct {
+ uint16_t feature;
uint32_t flag;
uint8_t delimit_mode;
fss_read_depths_t depths;
f_string_static_t standard;
+ f_string_static_t open_object;
f_string_dynamic_t buffer;
f_ranges_t closes;
#define fss_read_setting_t_initialize \
{ \
fss_read_main_flag_none_d, \
+ fss_read_feature_flag_none_d, \
fss_read_delimit_mode_all_e, \
F_okay, \
macro_f_state_t_initialize_1(fss_read_allocation_large_d, fss_read_allocation_small_d, F_okay, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0, 0), \
fss_read_depth_t_initialize, \
fss_read_depths_t_initialize, \
f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
f_string_dynamic_t_initialize, \
f_ranges_t_initialize, \
f_ranges_t_initialize, \
main->callback.print_set_end = &fss_read_print_set_end;
main->setting.standard = fss_read_basic_standard_s;
+ main->setting.open_object = f_fss_basic_open_s;
- main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_object_as_line_d;
- main->setting.flag &= ~fss_read_main_flag_object_trim_d;
- main->setting.flag &= ~fss_read_main_flag_payload_error_d;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
- main->setting.flag &= ~fss_read_main_flag_trim_object_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_has_close_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_depth_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_align_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_as_line_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_trim_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_trim_expand_d;
- main->setting.flag |= fss_read_main_flag_line_single_d | fss_read_main_flag_content_end_d;
- main->setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
+ main->setting.feature |= fss_read_feature_flag_line_single_d;
+ main->setting.feature |= fss_read_feature_flag_quote_content_d | fss_read_feature_flag_quote_object_d;
if (main->program.parameters.array[fss_read_parameter_as_e].result & f_console_result_value_e && main->program.parameters.array[fss_read_parameter_as_e].values.used) {
const f_number_unsigned_t index = main->program.parameters.array[fss_read_parameter_as_e].values.array[main->program.parameters.array[fss_read_parameter_as_e].values.used - 1];
f_compare_dynamic(as, fss_read_format_code_machine_0000_s) == F_equal_to) {
main->setting.standard = fss_read_basic_standard_s;
+ main->setting.open_object = f_fss_basic_open_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_object_as_line_d;
- main->setting.flag &= ~fss_read_main_flag_object_trim_d;
- main->setting.flag &= ~fss_read_main_flag_payload_error_d;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
- main->setting.flag &= ~fss_read_main_flag_trim_object_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_has_close_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_depth_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_align_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_as_line_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_trim_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_trim_expand_d;
- main->setting.flag |= fss_read_main_flag_line_single_d | fss_read_main_flag_content_end_d;
- main->setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
+ main->setting.feature |= fss_read_feature_flag_line_single_d;
+ main->setting.feature |= fss_read_feature_flag_quote_content_d | fss_read_feature_flag_quote_object_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
f_compare_dynamic(as, fss_read_format_code_machine_0001_s) == F_equal_to) {
main->setting.standard = fss_read_extended_standard_s;
+ main->setting.open_object = f_fss_extended_open_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_object_as_line_d;
- main->setting.flag &= ~fss_read_main_flag_object_trim_d;
- main->setting.flag &= ~fss_read_main_flag_payload_error_d;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
- main->setting.flag &= ~fss_read_main_flag_trim_object_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_has_close_d;
+ main->setting.feature &= ~fss_read_feature_flag_depth_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_align_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_as_line_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_trim_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_trim_expand_d;
- main->setting.flag |= fss_read_main_flag_line_single_d | fss_read_main_flag_content_multiple_d | fss_read_main_flag_content_end_d;
- main->setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
+ main->setting.feature |= fss_read_feature_flag_line_single_d | fss_read_feature_flag_content_multiple_d;
+ main->setting.feature |= fss_read_feature_flag_quote_content_d | fss_read_feature_flag_quote_object_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
f_compare_dynamic(as, fss_read_format_code_machine_0002_s) == F_equal_to) {
main->setting.standard = fss_read_basic_list_standard_s;
+ main->setting.open_object = f_fss_basic_list_open_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_end_d;
- main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_line_single_d;
- main->setting.flag &= ~fss_read_main_flag_payload_error_d;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
- main->setting.flag &= ~fss_read_main_flag_quote_content_d;
- main->setting.flag &= ~fss_read_main_flag_quote_object_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_has_close_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_depth_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_line_single_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_align_d;
+ main->setting.feature &= ~fss_read_feature_flag_quote_content_d;
+ main->setting.feature &= ~fss_read_feature_flag_quote_object_d;
- main->setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
+ main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
f_compare_dynamic(as, fss_read_format_code_machine_0003_s) == F_equal_to) {
main->setting.standard = fss_read_extended_list_standard_s;
+ main->setting.open_object = f_fss_extended_list_open_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_line_single_d;
- main->setting.flag &= ~fss_read_main_flag_content_end_d;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_line_single_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_depth_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_quote_content_d;
+ main->setting.feature &= ~fss_read_feature_flag_quote_object_d;
+
main->setting.flag &= ~fss_read_main_flag_payload_error_d;
main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
- main->setting.flag &= ~fss_read_main_flag_quote_content_d;
- main->setting.flag &= ~fss_read_main_flag_quote_object_d;
- main->setting.flag |= fss_read_main_flag_content_has_close_d;
- main->setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
+ main->setting.feature |= fss_read_feature_flag_content_has_close_d;
+ main->setting.feature |= fss_read_feature_flag_object_align_d;
+ main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
f_compare_dynamic(as, fss_read_format_code_machine_0008_s) == F_equal_to) {
main->setting.standard = fss_read_embedded_list_standard_s;
+ main->setting.open_object = f_fss_embedded_list_open_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_end_d;
- main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
- main->setting.flag &= ~fss_read_main_flag_line_single_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_has_close_d;
+ main->setting.feature &= ~fss_read_feature_flag_line_single_d;
+ main->setting.feature &= ~fss_read_feature_flag_quote_content_d;
+ main->setting.feature &= ~fss_read_feature_flag_quote_object_d;
+
main->setting.flag &= ~fss_read_main_flag_payload_error_d;
main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
- main->setting.flag &= ~fss_read_main_flag_quote_content_d;
- main->setting.flag &= ~fss_read_main_flag_quote_object_d;
- main->setting.flag |= fss_read_main_flag_content_has_close_d | fss_read_main_flag_content_multiple_d;
- main->setting.flag |= fss_read_main_flag_depth_multiple_d;
- main->setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
+ main->setting.feature |= fss_read_feature_flag_content_has_close_d | fss_read_feature_flag_content_multiple_d;
+ main->setting.feature |= fss_read_feature_flag_depth_multiple_d | fss_read_feature_flag_object_align_d;
+ main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
f_compare_dynamic(as, fss_read_format_code_machine_000e_s) == F_equal_to) {
main->setting.standard = fss_read_payload_standard_s;
+ main->setting.open_object = f_fss_payload_list_open_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_end_d;
- main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
- main->setting.flag &= ~fss_read_main_flag_line_single_d;
- main->setting.flag &= ~fss_read_main_flag_quote_content_d;
- main->setting.flag &= ~fss_read_main_flag_quote_object_d;
-
- main->setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_has_close_d;
+ main->setting.feature &= ~fss_read_feature_flag_content_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_depth_multiple_d;
+ main->setting.feature &= ~fss_read_feature_flag_object_align_d;
+ main->setting.feature &= ~fss_read_feature_flag_line_single_d;
+ main->setting.feature &= ~fss_read_feature_flag_quote_content_d;
+ main->setting.feature &= ~fss_read_feature_flag_quote_object_d;
+
+ main->setting.feature |= fss_read_feature_flag_object_as_line_d | fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
main->setting.flag |= fss_read_main_flag_payload_error_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag &= ~f_console_flag_disable_e;
}
if (main->setting.flag & fss_read_main_flag_original_d) {
- if (main->setting.flag & fss_read_main_flag_quote_content_d) {
+ if (main->setting.feature & fss_read_feature_flag_quote_content_d) {
fss_read_print_quote(&main->program.output, quote);
}
}
fll_print_except_in_dynamic_partial(main->setting.buffer, range, delimits, main->setting.comments, print->to);
if (main->setting.flag & fss_read_main_flag_original_d) {
- if (main->setting.flag & fss_read_main_flag_quote_content_d) {
+ if (main->setting.feature & fss_read_feature_flag_quote_content_d) {
fss_read_print_quote(&main->program.output, quote);
}
}
if (at >= main->setting.objects.used) return F_output_not;
- if (main->setting.flag & (fss_read_main_flag_trim_d | fss_read_main_flag_trim_object_d)) {
+ // The current FSS standards that have a only spaces to the left of a close so simply print all to the left.
+ if ((main->setting.feature & fss_read_feature_flag_object_align_d) && (main->setting.flag & fss_read_main_flag_content_d) && (!(main->setting.flag & fss_read_main_flag_original_d) || (main->setting.flag & fss_read_main_flag_trim_d))) {
+ if (at < main->setting.closes.used && main->setting.closes.array[at].start <= main->setting.closes.array[at].stop) {
+ f_range_t before = f_range_t_initialize;
+
+ if (main->setting.closes.array[at].start) {
+ before.start = main->setting.closes.array[at].start;
+ before.stop = main->setting.closes.array[at].stop ? main->setting.closes.array[at].stop - 1 : 0;
+ }
+
+ if (before.start <= before.stop) {
+ fll_print_except_dynamic_partial(main->setting.buffer, before, delimits, main->program.output.to);
+ }
+ }
+ }
+
+ if (main->setting.flag & fss_read_main_flag_trim_d) {
if (main->setting.flag & fss_read_main_flag_original_d) {
if (at < main->setting.quotes_object.used && main->setting.quotes_object.array[at]) {
fss_read_print_quote(&main->program.output, main->setting.quotes_object.array[at]);
}
else {
if (main->setting.flag & fss_read_main_flag_original_d) {
- if (at < main->setting.quotes_object.used && main->setting.quotes_object.array[at]) {
- fss_read_print_quote(&main->program.output, main->setting.quotes_object.array[at]);
+ if (main->setting.feature & fss_read_feature_flag_object_trim_expand_d) {
+ if (main->setting.buffer.used) {
+ f_range_t before = f_range_t_initialize;
+ f_range_t after = f_range_t_initialize;
+
+ if (main->setting.objects.array[at].start <= main->setting.objects.array[at].stop) {
+ if (main->setting.objects.array[at].start) {
+ before.start = before.stop = main->setting.objects.array[at].start - 1;
+
+ while (before.start && main->setting.buffer.string[before.start] != f_string_eol_s.string[0]) --before.start;
+
+ if (main->setting.buffer.string[before.start] == f_string_eol_s.string[0]) ++before.start;
+ }
+
+ if (main->setting.open_object.used && main->setting.objects.array[at].stop + 1 < main->setting.buffer.used) {
+ after.start = after.stop = main->setting.objects.array[at].stop + 1;
+
+ if (main->setting.buffer.string[after.stop] == main->setting.open_object.string[0]) {
+ after.start = 1;
+ after.stop = 0;
+ }
+ else {
+ while (after.stop < main->setting.buffer.used && main->setting.buffer.string[after.stop] != main->setting.open_object.string[0]) ++after.stop;
+
+ if (after.stop == main->setting.buffer.used || main->setting.buffer.string[after.stop] == main->setting.open_object.string[0]) --after.stop;
+ }
+ }
+ }
+
+ if (before.start <= before.stop) {
+ fll_print_except_dynamic_partial(main->setting.buffer, before, delimits, main->program.output.to);
+ }
+
+ fll_print_except_dynamic_partial(main->setting.buffer, main->setting.objects.array[at], delimits, main->program.output.to);
+
+ if (after.start <= after.stop) {
+ fll_print_except_dynamic_partial(main->setting.buffer, after, delimits, main->program.output.to);
+ }
+ }
}
+ else {
+ if (at < main->setting.quotes_object.used && main->setting.quotes_object.array[at]) {
+ fss_read_print_quote(&main->program.output, main->setting.quotes_object.array[at]);
+ }
- fll_print_dynamic_partial(main->setting.buffer, main->setting.objects.array[at], main->program.output.to);
+ fll_print_dynamic_partial(main->setting.buffer, main->setting.objects.array[at], main->program.output.to);
- if (at < main->setting.quotes_object.used && main->setting.quotes_object.array[at]) {
- fss_read_print_quote(&main->program.output, main->setting.quotes_object.array[at]);
+ if (at < main->setting.quotes_object.used && main->setting.quotes_object.array[at]) {
+ fss_read_print_quote(&main->program.output, main->setting.quotes_object.array[at]);
+ }
}
}
else {
// For depth, most standards do not support nesting, so any depth greater than 0 can be predicted without processing the buffer.
// For select, most standards do not support multiple select, so any select greater than 0 can be predicted without processing the buffer.
- if (!(main->setting.flag & fss_read_main_flag_depth_multiple_d) && main->setting.depth.depth || !(main->setting.flag & fss_read_main_flag_content_multiple_d) && ((main->setting.flag & fss_read_main_flag_select_d) && main->setting.select)) {
+ if (!(main->setting.feature & fss_read_feature_flag_depth_multiple_d) && main->setting.depth.depth || !(main->setting.feature & fss_read_feature_flag_content_multiple_d) && (main->setting.flag & fss_read_main_flag_select_d) && main->setting.select) {
if (main->setting.flag & fss_read_main_flag_total_d) {
fss_read_print_number(&main->program.output, 0);
}
}
// If the standard only has one line per Content, then any line value greater than 0 equates to no line to print.
- if ((main->setting.flag & fss_read_main_flag_line_d) && (main->setting.flag & fss_read_main_flag_line_single_d)) {
+ if ((main->setting.flag & fss_read_main_flag_line_d) && (main->setting.feature & fss_read_feature_flag_line_single_d)) {
if (main->setting.line) {
main->setting.state.status = F_okay;
if (main->setting.flag & fss_read_main_flag_line_d) {
// If using "--at" for standards that only support one line per Object, then the only valid line is line 0.
- if ((main->setting.flag & fss_read_main_flag_line_single_d) && !at) break;
+ if ((main->setting.feature & fss_read_feature_flag_line_single_d) && !at) break;
if (main->callback.process_at_line) {
f_number_unsigned_t line = 0;
main->callback.print_object_end(&main->program.output);
}
- if (!(main->setting.flag & fss_read_main_flag_object_as_line_d)) {
+ if (!(main->setting.feature & fss_read_feature_flag_object_as_line_d)) {
if (main->callback.print_set_end) {
main->callback.print_set_end(&main->program.output, at);
}
return;
}
- if (main->setting.flag & fss_read_main_flag_object_as_line_d && main->callback.print_object_end) {
+ if ((main->setting.feature & fss_read_feature_flag_object_as_line_d) && main->callback.print_object_end) {
if (F_status_set_fine(main->callback.print_object_end(&main->program.output)) != F_output_not) {
print_state = 0x4;
}
}
}
- if ((main->setting.flag & fss_read_main_flag_object_as_line_d) || !(main->setting.flag & fss_read_main_flag_content_d)) {
+ if ((main->setting.feature & fss_read_feature_flag_object_as_line_d) || !(main->setting.flag & fss_read_main_flag_content_d)) {
++(*line);
}
}
if (!main->setting.contents.array[at].used) {
// Must process/count line when both Object and Content share the same line and Content is empty for single line Content.
- if ((main->setting.flag & fss_read_main_flag_line_single_d)) {
+ if ((main->setting.feature & fss_read_feature_flag_line_single_d)) {
if (main->setting.flag & fss_read_main_flag_object_d) {
- if (!(main->setting.flag & fss_read_main_flag_object_as_line_d)) {
+ if (!(main->setting.feature & fss_read_feature_flag_object_as_line_d)) {
if (*line == main->setting.line) {
if (main->callback.print_set_end) {
main->callback.print_set_end(&main->program.output, at);
f_number_unsigned_t i = 0;
- if (main->setting.flag & fss_read_main_flag_line_single_d) {
+ if (main->setting.feature & fss_read_feature_flag_line_single_d) {
if (*line == main->setting.line) {
if (main->setting.contents.array[at].used && main->callback.print_content && main->callback.print_object_end_content) {
for (f_status_t printed = F_okay; ; ) {
}
// Simulate the ending by printing.
- if ((main->setting.flag & fss_read_main_flag_object_d) && (main->setting.flag & fss_read_main_flag_content_has_close_d)) {
+ if ((main->setting.flag & fss_read_main_flag_object_d) && (main->setting.feature & fss_read_feature_flag_content_has_close_d)) {
if (*line == main->setting.line) {
if (main->callback.print_set_end) {
main->callback.print_set_end(&main->program.output, at);
f_number_unsigned_t max = 0;
- if (main->setting.flag & fss_read_main_flag_content_multiple_d) {
+ if (main->setting.feature & fss_read_feature_flag_content_multiple_d) {
f_number_unsigned_t i = 0;
f_number_unsigned_t current = 0;
memset(names, F_false, sizeof(bool) * main->setting.objects.used);
- if (main->setting.flag & (fss_read_main_flag_trim_d | fss_read_main_flag_trim_object_d | fss_read_main_flag_object_trim_d)) {
+ if ((main->setting.flag & fss_read_main_flag_trim_d) || (main->setting.feature & fss_read_feature_flag_object_trim_d)) {
for (i = 0; i < main->setting.objects.used; ++i) {
if (fss_read_signal_check(main)) return;
continue;
}
- if (main->setting.flag & fss_read_main_flag_object_as_line_d) {
+ if (main->setting.feature & fss_read_feature_flag_object_as_line_d) {
++total;
}
}
} // for
// Treat Content as the last line even if it does not end with a new line.
- if ((main->setting.flag & fss_read_main_flag_line_single_d) && i) {
+ if ((main->setting.feature & fss_read_feature_flag_line_single_d) && i) {
j = main->setting.contents.array[at].array[i - 1].stop;
if (main->setting.buffer.string[j] != f_string_eol_s.string[0]) ++total;
}
- if ((main->setting.flag & fss_read_main_flag_object_d) && (main->setting.flag & fss_read_main_flag_content_has_close_d)) {
+ if ((main->setting.flag & fss_read_main_flag_object_d) && (main->setting.feature & fss_read_feature_flag_content_has_close_d)) {
++total;
}
}
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
+ data.setting.feature |= fss_read_feature_flag_object_as_line_d;
+ data.setting.feature |= fss_read_feature_flag_object_trim_d | fss_read_feature_flag_object_trim_expand_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_payload_standard_s;
+ data.setting.open_object = f_fss_payload_list_open_s;
data.callback.process_help = &fss_read_payload_process_help;
data.callback.process_last_line = &fss_read_process_last_line;
run parameter:"script" ./tests/runtime/script/generate.sh parameter:"test_prefix"0002 tests/runtime/fss_0002/source/test-0002-mixed.fss parameter:"build_path"test/fss_0002
print
+ print Generating Test 0003 for Basic List (FSS-0002).
+ print
+ run parameter:"script" ./tests/runtime/script/generate.sh parameter:"test_prefix"0002 tests/runtime/fss_0002/source/test-0003-object_space.fss parameter:"build_path"test/fss_0002
+
+ print
print Generating Test 0000 for Extended List (FSS-0003).
print
run parameter:"script" ./tests/runtime/script/generate.sh parameter:"test_prefix"0003 tests/runtime/fss_0003/source/test-0002-mixed.fss parameter:"build_path"test/fss_0003
print
+ print Generating Test 0003 for Extended List (FSS-0003).
+ print
+ run parameter:"script" ./tests/runtime/script/generate.sh parameter:"test_prefix"0003 tests/runtime/fss_0003/source/test-0003-object_space.fss parameter:"build_path"test/fss_0003
+
+ print
print Generating Test 0000 for Embedded List (FSS-0008).
print
run parameter:"script" ./tests/runtime/script/generate.sh parameter:"test_prefix"0008 tests/runtime/fss_0008/source/test-0002-mixed.fss parameter:"build_path"test/fss_0008
print
+ print Generating Test 0003 for Embedded List (FSS-0008).
+ print
+ run parameter:"script" ./tests/runtime/script/generate.sh parameter:"test_prefix"0008 tests/runtime/fss_0008/source/test-0003-object_space.fss parameter:"build_path"test/fss_0008
+
+ print
print Generating Test 0000 for Payload (FSS-000E).
print
print
run parameter:"script" ./tests/runtime/script/generate.sh parameter:"test_prefix"000e tests/runtime/fss_000e/source/test-0002-mixed.fss parameter:"build_path"test/fss_000e
+ print
+ print Generating Test 0003 for Payload (FSS-000E).
+ print
+ run parameter:"script" ./tests/runtime/script/generate.sh parameter:"test_prefix"000e tests/runtime/fss_000e/source/test-0003-object_space.fss parameter:"build_path"test/fss_000e
+
verify_process:
print
print Verifying Tests for Basic (FSS-0000).
d
a
привет
-y
+ y
"мир"
привет has space
"This is quoted"
-AlsoGood
-hi
-привет has space
+ AlsoGood
+hi
+ привет has space
a
also_empty
d
a
привет
-y
+ y
"мир"
привет has space
"This is quoted"
-AlsoGood
-hi
-привет has space
+ AlsoGood
+hi
+ привет has space
a
also_empty
привет:
мир
-y:
+ y :
z
"мир":
quoted, "yep".
\"and so does this" "have space"
"This is quoted":
But still a valid list.
-AlsoGood:
-hi:
+ AlsoGood:
+hi :
Check this.
-привет has space:
+ привет has space :
...
a:
a second "a".
привет:
мир
-y:
+ y :
z
"мир":
quoted, "yep".
\"and so does this" "have space"
"This is quoted":
But still a valid list.
-AlsoGood:
-hi:
+ AlsoGood:
+hi :
Check this.
-привет has space:
+ привет has space :
...
a:
a second "a".
a:
hi:
-a:
-a:
+ a:
+a :
:
The object name is an empty string.
a:
hi:
-a:
-a:
+ a:
+a :
:
The object name is an empty string.
-\# a valid list
+ \# a valid list
a
-\# a valid list
+ \# a valid list
a
"мир"
привет has space
empty
hi
-has spaces
+ has spaces
a
-\# a valid list
+ \# a valid list
a
"мир"
привет has space
empty
hi
-has spaces
+ has spaces
\\# even this is not.
привет мир a
-\# a valid list:
+ \# a valid list:
with content.
a:
another "A" list.
c d
привет мир a
-has spaces:
+ has spaces :
yep.
fin
\\# even this is not.
привет мир a
-\# a valid list:
+ \# a valid list:
with content.
a:
another "A" list.
c d
привет мир a
-has spaces:
+ has spaces :
yep.
fin
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+мирмирмир
+
--- /dev/null
+Has no Object name (only white space) and is oddly spaced.
+
--- /dev/null
+Has no Object name (only white space) and is oddly spaced.
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+мирмирмир
+
--- /dev/null
+мирмирмир
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
+
+ with content.
+
+Has no Object name (only white space) and is oddly spaced.
+
+мирмирмир
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
+
+ with content.
+
+Has no Object name (only white space) and is oddly spaced.
+
+мирмирмир
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
+
+ with content.
+
+Has no Object name (only white space) and is oddly spaced.
+
+мирмирмир
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
+
+ with content.
+
+Has no Object name (only white space) and is oddly spaced.
+
+мирмирмир
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
+
+ with content.
+
+Has no Object name (only white space) and is oddly spaced.
+
+мирмирмир
+
--- /dev/null
+привет has space
--- /dev/null
+ привет has space
--- /dev/null
+привет has space
--- /dev/null
+привет has space
--- /dev/null
+ a
+ привет has space
+ inside
+ \# Valid Object
+
+мир
+ hi
--- /dev/null
+ a
+ привет has space
+ inside
+ \# Valid Object
+
+мир
+ hi
--- /dev/null
+a
+привет has space
+inside
+# Valid Object
+
+мир
+hi
--- /dev/null
+a
+привет has space
+inside
+# Valid Object
+
+мир
+hi
--- /dev/null
+a
+привет has space
+inside
+# Valid Object
+
+мир
+hi
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+привет has space:
--- /dev/null
+мир:
+мирмирмир
+
--- /dev/null
+ Several lines
--- /dev/null
+ Several lines
--- /dev/null
+:
+Has no Object name (only white space) and is oddly spaced.
+
--- /dev/null
+:
+Has no Object name (only white space) and is oddly spaced.
+
--- /dev/null
+ a :
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+ a :
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+мир:
+мирмирмир
+
--- /dev/null
+мир:
+мирмирмир
+
--- /dev/null
+привет has space:
--- /dev/null
+ a :
+
+ stuff
+
+ This has
+ Several lines
+
+ привет has space :
+ inside :
+
+ \# Valid Object :
+ with content.
+
+:
+Has no Object name (only white space) and is oddly spaced.
+
+мир :
+мирмирмир
+
+ hi :
--- /dev/null
+ a :
+
+ stuff
+
+ This has
+ Several lines
+
+ привет has space :
+ inside :
+
+ \# Valid Object :
+ with content.
+
+:
+Has no Object name (only white space) and is oddly spaced.
+
+мир :
+мирмирмир
+
+ hi :
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
+привет has space:
+inside:
+
+# Valid Object:
+ with content.
+
+:
+Has no Object name (only white space) and is oddly spaced.
+
+мир:
+мирмирмир
+
+hi:
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
+привет has space:
+inside:
+
+# Valid Object:
+ with content.
+
+:
+Has no Object name (only white space) and is oddly spaced.
+
+мир:
+мирмирмир
+
+hi:
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
+привет has space:
+inside:
+
+# Valid Object:
+ with content.
+
+:
+Has no Object name (only white space) and is oddly spaced.
+
+мир:
+мирмирмир
+
+hi:
--- /dev/null
+ a :
+
+ stuff
+
+ This has
+ Several lines
+
+ привет has space :
+ inside :
+
+ \# Valid Object :
+ with content.
+
+ :
+Has no Object name (only white space) and is oddly spaced.
+
+мир :
+мирмирмир
+
+# Comment Before.
+ hi :
+ # Comment inside.
d
a
привет
-y
+ y
"мир"
привет has space
"This is quoted"
-AlsoGood
-hi
-привет has space
+ AlsoGood
+hi
+ привет has space
a
also_empty
d
a
привет
-y
+ y
"мир"
привет has space
"This is quoted"
-AlsoGood
-hi
-привет has space
+ AlsoGood
+hi
+ привет has space
a
also_empty
привет{
мир
}
-y{
+ y {
z
}
"мир"{
"This is quoted"{
But still a valid list.
}
-AlsoGood{
+ AlsoGood{
}
-hi{
+hi {
Check this.
}
-привет has space{
+ привет has space {
...
}
a{
привет{
мир
}
-y{
+ y {
z
}
"мир"{
"This is quoted"{
But still a valid list.
}
-AlsoGood{
+ AlsoGood{
}
-hi{
+hi {
Check this.
}
-привет has space{
+ привет has space {
...
}
a{
a{
}
-a{
+ a{
}
-a{
+a {
}
a{
}
-a{
+ a{
}
-a{
+a {
}
}
hi{
}
-a{
+ a{
}
-a{
+a {
}
{
The object name is an empty string.
}
hi{
}
-a{
+ a{
}
-a{
+a {
}
{
The object name is an empty string.
привет has space
empty
hi
-has spaces
+ has spaces
привет has space
empty
hi
-has spaces
+ has spaces
привет мир a
}
-has spaces{
+ has spaces {
yep.
fin
}
привет мир a
}
-has spaces{
+ has spaces {
yep.
fin
}
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+ inside {
+ }
--- /dev/null
+Has no Object name (only white space) and is oddly spaced.
--- /dev/null
+Has no Object name (only white space) and is oddly spaced.
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+ inside {
+ }
--- /dev/null
+ inside {
+ }
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ \}
+ with content.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ \}
+ with content.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ }
+ with content.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ }
+ with content.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ }
+ with content.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
--- /dev/null
+привет has space
--- /dev/null
+ привет has space
--- /dev/null
+привет has space
--- /dev/null
+привет has space
--- /dev/null
+ a
+ привет has space
+ \# Valid Object
+
+мир
+ hi
--- /dev/null
+ a
+ привет has space
+ \# Valid Object
+
+мир
+ hi
--- /dev/null
+a
+привет has space
+# Valid Object
+
+мир
+hi
--- /dev/null
+a
+привет has space
+# Valid Object
+
+мир
+hi
--- /dev/null
+a
+привет has space
+# Valid Object
+
+мир
+hi
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+ }
--- /dev/null
+ привет has space{
+ inside {
+ }
+ }
--- /dev/null
+ Several lines
--- /dev/null
+ Several lines
--- /dev/null
+ {
+Has no Object name (only white space) and is oddly spaced.
+ }
--- /dev/null
+ {
+Has no Object name (only white space) and is oddly spaced.
+ }
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+ }
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+ }
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+ }
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+ }
--- /dev/null
+мир{
+мирмирмир
+}
--- /dev/null
+мир{
+мирмирмир
+}
--- /dev/null
+ привет has space{
+ inside {
+ }
+ }
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+ }
+ привет has space {
+ inside {
+ \}
+ }
+ \# Valid Object {
+ with content.
+ }
+{
+Has no Object name (only white space) and is oddly spaced.
+ }
+мир {
+мирмирмир
+}
+ hi {
+ }
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+ }
+ привет has space {
+ inside {
+ \}
+ }
+ \# Valid Object {
+ with content.
+ }
+{
+Has no Object name (only white space) and is oddly spaced.
+ }
+мир {
+мирмирмир
+}
+ hi {
+ }
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+ }
+ привет has space{
+ inside {
+ }
+ }
+ # Valid Object{
+ with content.
+ }
+ {
+Has no Object name (only white space) and is oddly spaced.
+ }
+мир{
+мирмирмир
+}
+ hi{
+ }
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+ }
+ привет has space{
+ inside {
+ }
+ }
+ # Valid Object{
+ with content.
+ }
+ {
+Has no Object name (only white space) and is oddly spaced.
+ }
+мир{
+мирмирмир
+}
+ hi{
+ }
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+ }
+ привет has space{
+ inside {
+ }
+ }
+ # Valid Object{
+ with content.
+ }
+ {
+Has no Object name (only white space) and is oddly spaced.
+ }
+мир{
+мирмирмир
+}
+ hi{
+ }
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+ }
+
+ привет has space {
+ inside {
+ \}
+ }
+
+ \# Valid Object {
+ with content.
+ }
+
+ {
+Has no Object name (only white space) and is oddly spaced.
+ }
+
+мир {
+мирмирмир
+}
+
+# Comment Before.
+ hi {
+ # Comment inside.
+ }
+# Comment after.
d
a
привет
-y
+ y
"мир"
привет has space
"This is quoted"
-AlsoGood
-hi
-привет has space
+ AlsoGood
+hi
+ привет has space
a
also_empty
d
a
привет
-y
+ y
"мир"
привет has space
"This is quoted"
-AlsoGood
-hi
-привет has space
+ AlsoGood
+hi
+ привет has space
a
also_empty
привет{
мир
}
-y{
+ y {
z
}
"мир"{
"This is quoted"{
But still a valid list.
}
-AlsoGood{
+ AlsoGood{
}
-hi{
+hi {
Check this.
}
-привет has space{
+ привет has space {
...
}
a{
привет{
мир
}
-y{
+ y {
z
}
"мир"{
"This is quoted"{
But still a valid list.
}
-AlsoGood{
+ AlsoGood{
}
-hi{
+hi {
Check this.
}
-привет has space{
+ привет has space {
...
}
a{
a{
}
-a{
+ a{
}
-a{
+a {
}
a{
}
-a{
+ a{
}
-a{
+a {
}
}
hi{
}
-a{
+ a{
}
-a{
+a {
}
{
The object name is an empty string.
}
hi{
}
-a{
+ a{
}
-a{
+a {
}
{
The object name is an empty string.
привет has space
empty
hi
-has spaces
+ has spaces
привет has space
empty
hi
-has spaces
+ has spaces
привет мир a
}
-has spaces{
+ has spaces {
yep.
fin
}
привет мир a
}
-has spaces{
+ has spaces {
yep.
fin
}
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+ inside {
+ }
--- /dev/null
+Has no Object name (only white space) and is oddly spaced.
--- /dev/null
+Has no Object name (only white space) and is oddly spaced.
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
--- /dev/null
+ inside {
+ }
--- /dev/null
+ inside {
+ }
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ }
+ with content.
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
+ empty {
+ }
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ }
+ with content.
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
+ empty {
+ }
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ }
+ with content.
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
+ empty {
+ }
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ }
+ with content.
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
+ empty {
+ }
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+ inside {
+ }
+ with content.
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+Has no Object name (only white space) and is oddly spaced.
+мирмирмир
+ empty {
+ }
--- /dev/null
+привет has space
--- /dev/null
+ привет has space
--- /dev/null
+привет has space
--- /dev/null
+привет has space
--- /dev/null
+ a
+ привет has space
+ \# Valid Object
+ \# Valid Object
+
+мир
+ hi
+nested
--- /dev/null
+ a
+ привет has space
+ \# Valid Object
+ \# Valid Object
+
+мир
+ hi
+nested
--- /dev/null
+a
+привет has space
+# Valid Object
+# Valid Object
+
+мир
+hi
+nested
--- /dev/null
+a
+привет has space
+# Valid Object
+# Valid Object
+
+мир
+hi
+nested
--- /dev/null
+a
+привет has space
+# Valid Object
+# Valid Object
+
+мир
+hi
+nested
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+}
--- /dev/null
+ привет has space{
+ inside {
+ }
+}
--- /dev/null
+мир{
+мирмирмир
+}
--- /dev/null
+ Several lines
--- /dev/null
+ Several lines
--- /dev/null
+ {
+ Has no Object name (only white space) and is oddly spaced.
+}
--- /dev/null
+ {
+ Has no Object name (only white space) and is oddly spaced.
+}
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+}
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+}
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+}
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+}
--- /dev/null
+мир{
+мирмирмир
+}
--- /dev/null
+мир{
+мирмирмир
+}
--- /dev/null
+ привет has space{
+ inside {
+ }
+}
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+}
+ привет has space {
+ inside {
+ }
+}
+ \# Valid Object {
+ with content.
+}
+ \# Valid Object {
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+}
+{
+ Has no Object name (only white space) and is oddly spaced.
+}
+мир {
+мирмирмир
+}
+ hi {
+ }
+nested {
+ empty {
+ }
+}
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+ }
+ привет has space {
+ inside {
+ }
+ }
+ \# Valid Object {
+ with content.
+ }
+ \# Valid Object {
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+ }
+{
+Has no Object name (only white space) and is oddly spaced.
+ }
+мир {
+мирмирмир
+}
+ hi {
+ # Comment inside.
+ }
+nested {
+ empty {
+ }
+ # Comment after.
+}
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+}
+ привет has space{
+ inside {
+ }
+}
+ # Valid Object{
+ with content.
+}
+ # Valid Object{
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+}
+ {
+ Has no Object name (only white space) and is oddly spaced.
+}
+мир{
+мирмирмир
+}
+ hi{
+ }
+nested{
+ empty {
+ }
+}
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+}
+ привет has space{
+ inside {
+ }
+}
+ # Valid Object{
+ with content.
+}
+ # Valid Object{
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+}
+ {
+ Has no Object name (only white space) and is oddly spaced.
+}
+мир{
+мирмирмир
+}
+ hi{
+ }
+nested{
+ empty {
+ }
+}
--- /dev/null
+ a{
+
+ stuff
+
+ This has
+ Several lines
+}
+ привет has space{
+ inside {
+ }
+}
+ # Valid Object{
+ with content.
+}
+ # Valid Object{
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+}
+ {
+ Has no Object name (only white space) and is oddly spaced.
+}
+мир{
+мирмирмир
+}
+ hi{
+ }
+nested{
+ empty {
+ }
+}
--- /dev/null
+ a {
+
+ stuff
+
+ This has
+ Several lines
+ }
+
+ привет has space {
+ inside {
+ }
+ }
+
+ \# Valid Object {
+ with content.
+ }
+
+ \# Valid Object {
+ \### Nested valud Object {
+ with nested content.
+ }
+ and outside.
+ }
+
+ {
+Has no Object name (only white space) and is oddly spaced.
+ }
+
+мир {
+мирмирмир
+}
+
+# Comment Before.
+ hi {
+ # Comment inside.
+ }
+# Comment after.
+
+nested {
+ # Comment Before.
+ empty {
+ # Comment inside.
+ }
+ # Comment after.
+}
d
a
привет
-y
+ y
"мир"
привет has space
"This is quoted"
-AlsoGood
-hi
-привет has space
+ AlsoGood
+hi
+ привет has space
a
also_empty
payload
d
a
привет
-y
+ y
"мир"
привет has space
"This is quoted"
-AlsoGood
-hi
-привет has space
+ AlsoGood
+hi
+ привет has space
a
also_empty
payload
привет:
мир
-y:
+ y :
z
"мир":
quoted, "yep".
\"and so does this" "have space"
"This is quoted":
But still a valid list.
-AlsoGood:
-hi:
+ AlsoGood:
+hi :
Check this.
-привет has space:
+ привет has space :
...
a:
a second "a".
привет:
мир
-y:
+ y :
z
"мир":
quoted, "yep".
\"and so does this" "have space"
"This is quoted":
But still a valid list.
-AlsoGood:
-hi:
+ AlsoGood:
+hi :
Check this.
-привет has space:
+ привет has space :
...
a:
a second "a".
a:
hi:
-a:
-a:
+ a:
+a :
:
The object name is an empty string.
a:
hi:
-a:
-a:
+ a:
+a :
:
The object name is an empty string.
-\# a valid list
+ \# a valid list
a
-\# a valid list
+ \# a valid list
a
"мир"
привет has space
empty
hi
-has spaces
+ has spaces
payload
a
-\# a valid list
+ \# a valid list
a
"мир"
привет has space
empty
hi
-has spaces
+ has spaces
payload
\\# even this is not.
привет мир a
-\# a valid list:
+ \# a valid list:
with content.
a:
another "A" list.
c d
привет мир a
-has spaces:
+ has spaces :
yep.
fin
payload:
\\# even this is not.
привет мир a
-\# a valid list:
+ \# a valid list:
with content.
a:
another "A" list.
c d
привет мир a
-has spaces:
+ has spaces :
yep.
fin
payload:
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+мирмирмир
+
--- /dev/null
+Has no Object name (only white space) and is oddly spaced.
+
--- /dev/null
+Has no Object name (only white space) and is oddly spaced.
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+мирмирмир
+
--- /dev/null
+мирмирмир
+
--- /dev/null
+привет has space
--- /dev/null
+ привет has space
--- /dev/null
+привет has space
--- /dev/null
+привет has space
--- /dev/null
+ a
+ привет has space
+ inside
+ \# Valid Object
+
+мир
+ hi
+payload
--- /dev/null
+ a
+ привет has space
+ inside
+ \# Valid Object
+
+мир
+ hi
+payload
--- /dev/null
+a
+привет has space
+inside
+# Valid Object
+
+мир
+hi
+payload
--- /dev/null
+a
+привет has space
+inside
+# Valid Object
+
+мир
+hi
+payload
--- /dev/null
+a
+привет has space
+inside
+# Valid Object
+
+мир
+hi
+payload
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+привет has space:
--- /dev/null
+мир:
+мирмирмир
+
--- /dev/null
+ Several lines
--- /dev/null
+ Several lines
--- /dev/null
+:
+Has no Object name (only white space) and is oddly spaced.
+
--- /dev/null
+:
+Has no Object name (only white space) and is oddly spaced.
+
--- /dev/null
+ a :
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+ a :
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+a:
+
+ stuff
+
+ This has
+ Several lines
+
--- /dev/null
+мир:
+мирмирмир
+
--- /dev/null
+мир:
+мирмирмир
+
--- /dev/null
+привет has space:
--- /dev/null
+ a :
+
+ stuff
+
+ This has
+ Several lines
+
+ привет has space :
+ inside :
+
+ \# Valid Object :
+ with content.
+
+:
+Has no Object name (only white space) and is oddly spaced.
+
+мир :
+мирмирмир
+
+ hi :
+
+payload:
+0
+1
+2
+3
+done.