You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mods (complete and add to the following information):
Arma 3:2.00 stable
CBA:3.15.2 stable
Description:
As the title says, the function fails to parse:
Numbers
- 2
// parses to ["2"] (incorrect, should be number)
| and > multiline strings
data: | There once was a tall man from Ealing Who got on a bus to Darjeeling It said on the door "Please don't sit on the floor" So he carefully sat on the ceiling
data: > Wrapped text will be folded into a single paragraph Blank lines denote paragraph breaks
// Both fail
{} hashmaps
name: John Smithage: 33
// parses to ["#CBA_HASH#",["name","age"],["John Smith","33"],any]
{name: John Smith, age: 33}
// parses to ["#CBA_HASH#",["{name"],["John Smith, age: 33}"],any] (incorrect)
--- document headers and ... terminators
Used to separate multiple documents within a single stream. Ideally the function would either create an array containing all the hashes (documents) when one is encountered, or parse the selected document by index (default first).
--- # Favorite movies
- Casablanca
- North by Northwest
- The Man Who Wasn't There
// Fails
Without the above, ... used to indicate end of document fails.
// parses to ["#CBA_HASH#",["Employee"],[["#CBA_HASH#",["id","name","department"],["1","""Franc""",["#CBA_HASH#",["name","depid"],["""Sales""","""11"""],any]],any]],any] (Incorrect)
Note the """
Hashes within arrays
- name: Mary Smithage: 27
// fails
And other things that are more of a request than anything else:
!!type used to explicitly define the type, and local datatypes !type
Expected behavior:
The above examples to be correctly parse, though with some of the examples I might be stretching it a bit.
Ideally the function should be able to parse:
Extreme example
---
receipt: Oz-Ware Purchase Invoicedate: 2012-08-06customer:
first_name: Dorothyfamily_name: Galeitems:
- part_no: A4786descrip: Water Bucket (Filled)price: 1.47quantity: 4
- part_no: E1628descrip: High Heeled "Ruby" Slipperssize: 8price: 133.7quantity: 1bill-to: &id001street: | 123 Tornado Alley Suite 16city: East Centervillestate: KSship-to: *id001specialDelivery: > Follow the Yellow Brick Road to the Emerald City. Pay no attention to the man behind the curtain.
...
Where did the issue occur?
Editor (Singleplayer) / Editor (Multiplayer)
Log Files:
Details
20:39:40 [CBA] (hashes) ERROR: CBA YAML parser error x\cba\addons\hashes\fnc_parseYAML.sqf:72
20:39:40 Unexpected new-line, when expecting ':', in "test.yaml" at line 2:
20:39:40
20:39:40 001: ...
20:39:40 002: |#|
20:39:40 Error in expression <es) - 1);
private _lastChar = _lastLine select ((count _lastLine) - 1);
_lastLi>
20:39:40 Error position: <select ((count _lastLine) - 1);
_lastLi>
20:39:40 Error Zero divisor
20:39:40 File \x\cba\addons\hashes\fnc_parseYAML.sqf [CBA_fnc_parseYAML]..., line 1887
20:39:52 [CBA] (hashes) ERROR: CBA YAML parser error x\cba\addons\hashes\fnc_parseYAML.sqf:72
20:39:52 Unexpected new-line, when expecting ':', in "test.yaml" at line 4:
20:39:52
20:39:52 001: test: 1
20:39:52 002:
20:39:52 003: ...
20:39:52 004: |#|
20:39:52 Error in expression <es) - 1);
private _lastChar = _lastLine select ((count _lastLine) - 1);
_lastLi>
20:39:52 Error position: <select ((count _lastLine) - 1);
_lastLi>
20:39:52 Error Zero divisor
20:39:52 File \x\cba\addons\hashes\fnc_parseYAML.sqf [CBA_fnc_parseYAML]..., line 1887
20:41:01 [CBA] (hashes) ERROR: CBA YAML parser error x\cba\addons\hashes\fnc_parseYAML.sqf:72
20:41:01 Unexpected new-line, when expecting ':', in "test.yaml" at line 2:
20:41:01
20:41:01 001: [milk, groceries, eggs, juice, fruits]
20:41:01 002: |#|
20:41:01 Error in expression <es) - 1);
private _lastChar = _lastLine select ((count _lastLine) - 1);
_lastLi>
20:41:01 Error position: <select ((count _lastLine) - 1);
_lastLi>
20:41:01 Error Zero divisor
20:41:01 File \x\cba\addons\hashes\fnc_parseYAML.sqf [CBA_fnc_parseYAML]..., line 1887
20:41:17 [CBA] (hashes) ERROR: CBA YAML parser error x\cba\addons\hashes\fnc_parseYAML.sqf:72
20:41:17 Unexpected new-line, when expecting ':', in "test.yaml" at line 2:
20:41:17
20:41:17 001: [milk, groceries, eggs, juice, fruits]
20:41:17 002: |#|
20:41:17 Error in expression <es) - 1);
private _lastChar = _lastLine select ((count _lastLine) - 1);
_lastLi>
20:41:17 Error position: <select ((count _lastLine) - 1);
_lastLi>
20:41:17 Error Zero divisor
20:41:17 File \x\cba\addons\hashes\fnc_parseYAML.sqf [CBA_fnc_parseYAML]..., line 1887
Additional context:
I'm not really expecting this to be solved, but I'm just throwing it out here. Might be nice for someone who wants a challenge.
The text was updated successfully, but these errors were encountered:
Mods (complete and add to the following information):
2.00 stable
3.15.2 stable
Description:
As the title says, the function fails to parse:
Numbers
- 2
// parses to
["2"]
(incorrect, should be number)| and > multiline strings
// Both fail
{} hashmaps
// parses to
["#CBA_HASH#",["name","age"],["John Smith","33"],any]
{name: John Smith, age: 33}
// parses to
["#CBA_HASH#",["{name"],["John Smith, age: 33}"],any]
(incorrect)--- document headers and ... terminators
Used to separate multiple documents within a single stream. Ideally the function would either create an array containing all the hashes (documents) when one is encountered, or parse the selected document by index (default first).// Fails
Without the above,
...
used to indicate end of document fails.Inline arrays
// parses to
["#CBA_HASH#",["key1"],[["value1","value2","value3","value4","value5"]],any]
// parses to
["#CBA_HASH#",["key1"],["[value1,value2,value3,value4,value5]"],any]
(incorrect)// fails
" and ' alternative string syntax
// parses to
["#CBA_HASH#",["Employee"],[["#CBA_HASH#",["id","name","department"],["1","""Franc""",["#CBA_HASH#",["name","depid"],["""Sales""","""11"""],any]],any]],any]
(Incorrect)Note the
"""
Hashes within arrays
// fails
And other things that are more of a request than anything else:
!!type
used to explicitly define the type, and local datatypes!type
Examples taken (in part or full) from:
Steps to reproduce:
Expected behavior:
The above examples to be correctly parse, though with some of the examples I might be stretching it a bit.
Ideally the function should be able to parse:
Extreme example
Where did the issue occur?
Log Files:
Details
Additional context:
I'm not really expecting this to be solved, but I'm just throwing it out here. Might be nice for someone who wants a challenge.
The text was updated successfully, but these errors were encountered: