Commit Graph

71 Commits

Author SHA1 Message Date
Tony Garnock-Jones 7c0fc8f358 Repairs after merge 2023-10-29 22:32:27 +01:00
Tony Garnock-Jones 1aedfe46b7 Merge branch 'main' into comment-syntax-hash-space 2023-10-29 22:22:40 +01:00
Tony Garnock-Jones 9595872177 Test cases and implementation updates for delimiters following Boolean and SymbolOrNumber. Closes #47 2023-10-29 21:04:52 +01:00
Tony Garnock-Jones e8c0a2565e Repair errors exposed by parse tests in rust 2023-10-29 21:02:48 +01:00
Tony Garnock-Jones 755a8bc73b Enable parse tests in rust 2023-10-29 21:00:56 +01:00
Tony Garnock-Jones 2445ab4a5a Merge branch 'main' into comment-syntax-hash-space 2023-10-29 16:44:32 +01:00
Tony Garnock-Jones 130e58a3e1 More documentation 2023-10-27 11:40:55 +02:00
Tony Garnock-Jones 4b40bf174d Document Preserves crate 2023-10-27 00:46:27 +02:00
Tony Garnock-Jones ccf277cddb Switch to "# "-prefixed text comment annotation syntax 2023-10-18 10:20:30 +02:00
Tony Garnock-Jones 3b89cbe880 Switch back to prefix-format binary annotations 2023-10-15 00:35:25 +02:00
Tony Garnock-Jones b7a2acf65b Update implementations for simplified binary syntax.
As part of this, I noticed a problem when updating the Rust
implementation. With the BF..84 design for annotations, if you are
wanting to skip annotations—for example, if you're parsing
incrementally, SAX-style, ignoring annotations—then with any
parenthesised form you have to remember to check for and skip something
after reading a term. This is awkward, so I want to revisit the design
of annotations and go back to the prefix-form (85..) of the
current-mainline design.
2023-10-14 21:29:09 +02:00
Tony Garnock-Jones 930964ca05 cargo fmt 2023-07-21 18:15:30 +02:00
Tony Garnock-Jones 269ed2391a Repair text syntax for numbers and symbols. Closes #19/#36/#37/#38.
Numbers and (bare) Symbols are now disambiguated after reading, which
permits leading `+`, leading `0`, and a wider range of acceptable
Symbols.

Updates spec text, test cases, and implementations. Some ancillary fixes
to Python's comparison routines are also included.
2022-11-08 19:56:24 +01:00
Tony Garnock-Jones 52de025c21 Parsing and reading via TextReader/TextWriter 2022-10-26 16:00:48 +02:00
Tony Garnock-Jones 7fdf50b963 Support comma style option to preserves-tool 2022-06-08 16:10:33 +02:00
Tony Garnock-Jones 261395beaf `rec!` macro; access to `io::Write` inside `Writer`s 2022-01-19 14:25:52 +01:00
Tony Garnock-Jones 77c305a4cf into_string, into_bytestring, into_symbol 2021-10-04 14:28:56 +02:00
Tony Garnock-Jones 5260f85952 Fix value_owned for ArcValue 2021-10-02 11:49:40 +02:00
Tony Garnock-Jones e2a4e3d6cb Inline the heck out of the binary codec for a ~5% speedup 2021-09-30 13:12:06 +02:00
Tony Garnock-Jones 486a631e73 Add strip_annotations function and expose it in preserves-tool 2021-09-30 12:41:29 +02:00
Tony Garnock-Jones 29a882f953 Shrink commonest annotationless representation 2021-09-30 11:15:26 +02:00
Tony Garnock-Jones 06fc9aa017 NestedValue::D --> NestedValue::Embedded 2021-09-15 15:19:03 +02:00
Tony Garnock-Jones 8127033407 Surprisingly, associated types might simplify drastically! 2021-09-14 22:56:09 +02:00
Tony Garnock-Jones c4afc49646 Value::from various references-to-atoms 2021-09-12 14:55:05 +02:00
Tony Garnock-Jones 5f2a3e3eb8 Preserves value merge in Rust 2021-09-11 02:49:17 +02:00
Tony Garnock-Jones eda9979041 Owned destructors 2021-09-11 02:47:51 +02:00
Tony Garnock-Jones 8550be0ba2 Refactor SignedInteger conversions to be more comprehensive and less repetitive 2021-08-28 17:01:59 +02:00
Tony Garnock-Jones f387f5e8c9 Value::bytestring, NestedValue::bytestring 2021-08-27 17:17:30 +02:00
Tony Garnock-Jones 0aded61071 Take advantage of NestedValue::symbol 2021-08-27 16:59:54 +02:00
Tony Garnock-Jones 3e56cf3d7e NestedValue::symbol 2021-08-27 16:52:11 +02:00
Tony Garnock-Jones 965bda9f9e Add "real" 2021-08-08 17:08:32 -04:00
Tony Garnock-Jones 137cc63a97 Initial stab at preserves-path; repair error wrt EOF immediately following a number 2021-08-08 14:26:17 -04:00
Tony Garnock-Jones cfd9898b4d Option to escape spaces 2021-08-05 15:54:41 +02:00
Tony Garnock-Jones 661d96780d Yield Strings from TextWriter::encode* 2021-08-05 14:28:19 +02:00
Tony Garnock-Jones 87946abb63 Avoid egregious &'a mut R 2021-08-05 14:28:00 +02:00
Tony Garnock-Jones 3078396487 Conveniences for TextReader matching those existing for PackedReader 2021-08-04 15:41:23 +02:00
Tony Garnock-Jones d28901446d Decode text syntax from *byte* sources. 2021-08-03 16:26:40 +02:00
Tony Garnock-Jones e913951b91 TextWriter::encode for Vec<u8> 2021-08-02 21:49:40 +02:00
Tony Garnock-Jones e80d849f9a DomainUnparse is useless 2021-08-02 21:49:05 +02:00
Tony Garnock-Jones dcdfdb8dd9 Track boundaries in schema-emitted reader code 2021-08-02 20:55:44 +02:00
Tony Garnock-Jones 3176e5f8d0 Indented printing 2021-08-02 12:53:17 +02:00
Tony Garnock-Jones af1405e87a Use dtoa for better floating-point formatting 2021-08-02 12:14:07 +02:00
Tony Garnock-Jones 9d4e6998f2 TextReader/TextWriter 2021-08-02 11:42:48 +02:00
Tony Garnock-Jones 5fa8c32ba0 Cosmetic 2021-07-27 16:38:55 +02:00
Tony Garnock-Jones 48412ae7ea Simplify by removing DelimitedStream 2021-07-21 22:48:00 +02:00
Tony Garnock-Jones cae254ef21 Experimental deserialization direct from Reader 2021-07-21 21:52:20 +02:00
Tony Garnock-Jones 7712c6e0a9 More conversions for SignedInteger 2021-07-13 16:00:18 +02:00
Tony Garnock-Jones 423c9d0bba Better Debug for SignedInteger 2021-07-13 15:59:27 +02:00
Tony Garnock-Jones 6ffc34065f Value from usize/isize 2021-07-13 15:59:14 +02:00
Tony Garnock-Jones 932375fa49 NestedValue::domain() 2021-07-13 15:58:58 +02:00