Commit Graph

31 Commits

Author SHA1 Message Date
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 18753b1a4a Got rid of yamlWarning, use YamlPresenterError
* Added YamlWarningCallback that may be used to capture
   parser warnings
 * Removed yamlWarning as event kind
 * Replaced checks for well-formedness in presenter with asserts
 * Added checks for JSON compatibility of YamlStream in presenter
 * Added proper type hints for special float values in
   serializer to be able to check for them in the presenter
2016-01-05 19:06:55 +01:00
Felix Krause d2baa1749e Got rid of yamlError.
* Replaced yielding yamlError tokens with raising a YamlParserError
 * Renamed sequential.nim to parser.nim because it's the parser (duh)
2016-01-05 18:14:11 +01:00
Felix Krause 507c621aaf Implemented local tags for serialization
* Fixed a bug in the lexer where an error would be raised if
   characters not allowed in tag shorthands are used in local tags
 * Fixed processing of object tags for all kinds of root nodes in Parser
 * Improved dumper to output a space after a local tag
 * Renamed some enumeration types to conform better to the YAML spec
 * Added secondaryPrefix to YamlTagLibrary
 * Added possibility to control tag output style independently from
   presentation style in serializer
 * Created local tags for all types that are serialized and use them in
   construction and serialization
2016-01-04 21:46:33 +01:00
Felix Krause d828f4ddc5 Added benchmark. Fixed processing empty flow sets. 2015-12-29 00:14:47 +01:00
Felix Krause 238faf82ab Source restructuring, added config.nims
* moved src/* to .
 * added config.nims to build library and run tests
 * reduced compiler warnings
2015-12-28 22:03:16 +01:00
Felix Krause b1e828eae6 Added documentation comments 2015-12-27 23:40:27 +01:00
Felix Krause f2527efd46 Support additional boolean scalars
* on, off, yes, no, literals with leading or complete capital letters
 * added documentation
2015-12-27 21:36:47 +01:00
Felix Krause 2c9d065ecb Support tags for sequences and maps in block style 2015-12-27 17:37:42 +01:00
Felix Krause d7f1e726ab Added dump() and transform()
* Added a hint "mapMayHaveKeyObjects" to yamlMap
 * Added dumper.nim
 * Improved generated documentation a bit
2015-12-27 16:36:32 +01:00
Felix Krause 075cf8b8ef Worked on tag URI interface
* Added YamlTagLibrary
 * adhere to explicit tags in JSON
 * Fixed lexer type hints before YAML flow special characters
2015-12-26 18:40:23 +01:00
Felix Krause ca0f5d1741 Refactoring, less heap objects
* YamlParserEvent -> YamlStreamEvent
 * YamlStreamEvent is no longer a `ref` object. Test suite now
   runs in a small fraction of a second (compared to several
   seconds before)
 * Introduced YamlStream
2015-12-26 13:39:43 +01:00
Felix Krause c83d488886 Added JSON compositor. 2015-12-24 15:21:49 +01:00
Felix Krause e307cbbad5 Pipe type hints through parser. Fixed bugs. 2015-12-23 18:12:51 +01:00
Felix Krause ffcbbf89e6 Restructured source code 2015-12-23 12:35:07 +01:00
Felix Krause a9a1a67bc6 Support anchors on empty nodes 2015-12-22 23:35:03 +01:00
Felix Krause 545bff673a Support missing keys/values in maps 2015-12-22 22:28:27 +01:00
Felix Krause ca077e54ca Allow mixing explicit and implicit map keys 2015-12-22 21:08:58 +01:00
Felix Krause c1880b5117 Support tag handle after directives end 2015-12-22 18:51:16 +01:00
Felix Krause f249813b90 Implemented alias resolution
* Parse alias nodes properly
 * Fixed a bug that prevented you from having objects as map keys
 * Use AnchorId for reporting anchors instead of strings
 * Do not use nil strings for anchor and tag
2015-12-22 16:28:35 +01:00
Felix Krause f320449a2d Got tags working 2015-12-21 23:10:42 +01:00
Felix Krause 32f36515e7 Return TagIds instead of strings 2015-12-21 21:58:28 +01:00
Felix Krause 70597105cb Worked on tags
* introduced YamlSequentialParser object that stores
   all known tag URIs
 * Added procs for registering and querying tag URIs
 * Return non-specific tags instead of nil if no tags
   exist in source
2015-12-21 21:40:27 +01:00
Felix Krause edec7ece37 Implemented block scalars 2015-12-17 21:44:41 +01:00
Felix Krause 3ca3081e92 Added support for multiline plain scalars 2015-12-14 21:26:34 +01:00
Felix Krause b56f9cb537 Refactoring of parser. 2015-12-11 22:55:21 +01:00
Felix Krause 01416f61be Improved mixing block and flow content 2015-12-10 23:02:06 +01:00
Felix Krause ed7176131e Implemented flow style parsing
* Fixed lexer error where comma did not get properly processed
 * Implemented flow style in parser
 * Added tests
2015-12-10 22:28:57 +01:00
Felix Krause e642e41f90 Bug fixes in lexer and parser
* Lexer: column now always points to start of token
 * Lexer: added ability to compile with -d:yamlDebug for debug output
 * Parser: Correctly handle nested sequences and maps
 * Tests: Added parser tests for nested objects
2015-12-10 20:53:43 +01:00
Felix Krause 73ce41bbef Added parsing tests; got basic parsing working 2015-12-07 22:09:57 +01:00