Commit Graph

122 Commits

Author SHA1 Message Date
Felix Krause cb18c5cb9c Improved documentation 2016-02-02 21:14:56 +01:00
Felix Krause 32c42054f7 Renamed serialize() to represent() to better conform to YAML spec 2016-02-02 18:19:40 +01:00
Felix Krause e89a9a5b14 Serialization: Support enum types 2016-02-01 20:16:35 +01:00
Felix Krause e967038d06 Support custom types without serialize macro 2016-02-01 19:48:42 +01:00
Felix Krause 620ab55899 Added tests for ref serialization 2016-01-28 22:57:14 +01:00
Felix Krause f74a5da999 Implemented construction of ref objects. 2016-01-28 22:29:26 +01:00
Felix Krause 96f01385ef Implemented serializing ref objects. 2016-01-28 21:59:26 +01:00
Felix Krause cec66cd0a2 Presenter: Properly forward exceptions 2016-01-27 15:18:01 +01:00
Felix Krause 5162c310ce Serialization: Better proc names
* renamed serialize to serializeObject and construct to constructObject
 * added new serialize() and construct() procs that handle document
   start & end
 * re-raise AssertionError instead of swallowing it
2016-01-26 20:51:21 +01:00
Felix Krause 4c3f7cd485 Better and more system types for serialization
* Use int[8|16|32|64] and float[32|64] instead of int and float
 * Support uint[8|16|32|64]
 * Support char
2016-01-26 20:00:28 +01:00
Felix Krause d7498f1c8a Fixed error reporting in server 2016-01-24 21:43:33 +01:00
Felix Krause daafa8b8e8 Merge branch 'master' of github.com:flyx/NimYAML 2016-01-24 21:41:16 +01:00
Felix Krause cfe2f38899 Fixed server code 2016-01-24 21:41:06 +01:00
Felix Krause 24f44b5022 Fixed wrapped exception handling 2016-01-24 21:38:29 +01:00
Felix Krause f2c81f1fc5 Small improvements 2016-01-24 21:21:37 +01:00
Felix Krause 36872370d5 Fixed bugs in presenter, serialization, README
* Made presenter output numbers without double quotes in
   JSON style again
 * Fixed broken serialization.load
 * Updated examples in README
2016-01-24 20:53:51 +01:00
Felix Krause 8436026250 Sanitized exception handling in serialization 2016-01-24 20:38:30 +01:00
Felix Krause 42df37bbbe Added JSON construction tests 2016-01-24 19:19:03 +01:00
Felix Krause b7828884bd Documentation fixes.
* Some typo fixes in code
 * nim documentation now generates API doc with source links
 * presenter now uses "" if a string starts with @ or `
 * Removed some outdated stuff
2016-01-24 19:15:50 +01:00
Felix Krause a08f4c1e4e Sanitized exceptions and raises pragmas
* Added raises pragma to every proc in yaml.nim
 * Properly encapsulate exceptions from YamlStreams
 * Discovered a Nim compiler bug and added a workaround
 * Added possibility to query line, column and line content from
   YamlParser
 * Updated rst documentation
 * Actually call callback in fastparse if available
 * Fixed parsing YAML version
2016-01-24 18:24:09 +01:00
Felix Krause d05971d5ac bench: run 100 times per test and return mean 2016-01-24 12:28:14 +01:00
Felix Krause bb64b4eaec Made bench compile again 2016-01-24 11:50:07 +01:00
Felix Krause fdcc699768 Removed old lexer/parser impl in favor of new one
* fastparse now used for everything
 * private/[lexer|parser].nim gone
 * Made fastparse use YamlParser object
 * Got all tests working with fastparse
 * Some more smaller changes to API
2016-01-24 11:44:10 +01:00
Felix Krause 971218314e fastparse: made it pass the parsing tests
* Scan for implicit map key as soon as a property is encountered
 * Proper handling of node properties throughout parser
 * Fixed an issue where plain scalars sometimes contained garbage
   when yielded
 * Catch reserved chars @ and `
 * Fixed some test cases
 * Made parser test cases use fastparse
2016-01-23 17:44:50 +01:00
Felix Krause 7f8afef3d4 Handle line folding in double quoted strings 2016-01-23 15:29:45 +01:00
Felix Krause 954aeafd15 Implemented block scalar, improved comments 2016-01-23 14:09:52 +01:00
Felix Krause 573d4788c7 Properly parse flow sequences 2016-01-22 23:53:42 +01:00
Felix Krause 8c91abc917 fastparse: Implemented explicit keys 2016-01-22 23:44:26 +01:00
Felix Krause c89f07e1fd fastparse: Improvements to flow parsing 2016-01-22 22:40:22 +01:00
Felix Krause f670c5c86b fastparse: Support flow object as implicit keys 2016-01-22 21:36:11 +01:00
Felix Krause 7af566c3a0 Handle quoted strings in flow style.
* Also use fastparse for benchmarking
2016-01-21 19:23:45 +01:00
Felix Krause bb5804cd15 FastParser: Implemented flow style
* still missing: block scalars and explicit map keys
2016-01-20 23:38:39 +01:00
Felix Krause 55d5cfcbf9 Started re-implementing parser
* Made TagLibrary a ref object
 * Started writing fastparse.nim, a parser aimed to deliver
   much faster speeds than the current implementation. It
   currently is only able to parse block content
2016-01-20 21:18:28 +01:00
Felix Krause 94fd70a808 Made bench compile again 2016-01-15 00:10:20 +01:00
Felix Krause 9c731cb6d1 Refactoring lexer, part 1 2016-01-15 00:06:57 +01:00
Felix Krause 56d3537920 Refactoring: Shorter type names 2016-01-14 22:51:30 +01:00
Felix Krause 551c8b0dd1 Refactoring: Extracted type guessing from lexer 2016-01-14 19:58:38 +01:00
Felix Krause 6130c24370 git what the fuck are you doing 2016-01-14 19:01:30 +01:00
Felix Krause 26eb38c5c8 Build proper HTML documentation 2016-01-14 19:01:30 +01:00
Felix Krause 46acdc3ccd Fixed presenter JSON output 2016-01-14 19:00:03 +01:00
Felix Krause 58ec98f639 Made testing ground work in Firefox 2016-01-13 23:19:06 +01:00
Felix Krause 40e3e32f5d Build proper HTML documentation 2016-01-13 23:19:06 +01:00
Felix Krause 7cabfc652e Benchmark against libyaml.
* Took libyaml binding from nimlets and used it in bench
 * Use shallow copy for scalar content in parser
2016-01-13 21:01:50 +01:00
Felix Krause a1b92a14de REALLY fixed presenter bug 2016-01-11 21:12:38 +01:00
Felix Krause fe583e8538 Debug output 2016-01-11 21:10:30 +01:00
Felix Krause bc9aa06d13 Fixed bug in presenter 2016-01-11 21:08:57 +01:00
Felix Krause 9f83b79bc0 Handle dBlockInlineMap in presenter 2016-01-11 21:03:46 +01:00
Felix Krause 2ed4499674 Do write '?' in ypsMinimal 2016-01-11 21:01:36 +01:00
Felix Krause f29a55c907 REALLY don't use newlines in ypsMinimal 2016-01-11 20:59:49 +01:00
Felix Krause 2d4746b56c No newlines in explicit flow maps for ypsMinimal 2016-01-11 20:58:24 +01:00