Commit Graph

99 Commits

Author SHA1 Message Date
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
Felix Krause fc9607f959 Resolve non-specific tags in transform() 2016-01-11 20:54:06 +01:00
Felix Krause eb29582ef8 Output inline map for single key-value pair 2016-01-11 19:53:47 +01:00
Felix Krause 1b37675687 Merge branch 'master' of ../../git/NimYAML 2016-01-11 19:15:45 +01:00
Felix Krause 95cfd7bcba Server: use "block" instead of "blocks" 2016-01-11 19:15:09 +01:00
Felix Krause 1e39ca5b6c Removed unneccessary mapMayHaveKeyObjects 2016-01-11 19:12:55 +01:00
Felix Krause f5627254f7 Fixed bug in presenter 2016-01-07 11:58:33 +01:00
Felix Krause cf5f614b21 Properly continue parsing after quoted scalar 2016-01-07 11:49:21 +01:00
Felix Krause 9bd12797d2 Fixed parser code 2016-01-07 11:49:01 +01:00
Felix Krause 6edee9c81b Merge branch 'master' of ../../git/NimYAML 2016-01-07 11:32:09 +01:00
Felix Krause 9d708aa203 Enhanced server errror reporting 2016-01-07 11:31:45 +01:00
Felix Krause 4243226738 Support alias on more positions 2016-01-07 11:29:37 +01:00
Felix Krause 433ec3f114 Fixed server. 2016-01-05 23:19:00 +01:00
Felix Krause ca0a30900c Fixed CORS header 2016-01-05 21:36:37 +01:00
Felix Krause 68f0ba0cc7 Added jester-based YAML parsing webservice
* Added server/server.nim
 * Fixed a problem in presenter that made it crash when
   outputting a root map to JSON
2016-01-05 21:34:07 +01:00
Felix Krause f3f6f5de9e Added explicit raises pragma to present()
* Added YamlPresenter*Error exceptions
 * Added raises pragma to present()
 * catch exceptions from YamlStream and Stream in present() and
   put them as cause into YamlPresenter*Error
 * Added loadToJson() proc
 * Give "~" the type hint yTypeNull
 * Always output "null" for yTagNull/yTypeNull scalars when
   presenter is in JSON mode
2016-01-05 19:58:46 +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 8b12d069a5 More TODOs 2016-01-05 17:00:49 +01:00
Felix Krause d64184c025 Support serializing tuples. Multiple bugfixes.
* Parser: Properly support explicit keys in flow style.
 * Parser: Properly support object tags in flow style.
 * Serializer: Basic support for tuples.
 * Serializer: Properly parse int and bool types when given as
   string with explicit tag.
2016-01-05 16:54:14 +01:00
Felix Krause aa98c5863e Properly handle ytsRootOnly
* Yield tag of custom type serialization when using ytsRootOnly,
   but don't yield tags of map keys or values
 * Yield proper tag of Table[K, V] serialization if requested
 * renamed dumper.nim to presenter.nim to conform to YAML spec
2016-01-04 22:18:55 +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 57bf7cd12c Removed binary file, added TODO items 2015-12-29 18:54:24 +01:00
Felix Krause 16e72c6e1b Added README.md and private/events.nim 2015-12-29 18:38:22 +01:00