Commit graph

389 commits

Author SHA1 Message Date
Ferdinand Majerech f11fbf3b36 scanTagDirectiveValue returns handle length with return value, not ref param 2014-07-26 18:19:26 +02:00
Ferdinand Majerech 271eca053a scanYAMLDirectiveValue is now nothrow @nogc. 2014-07-26 18:15:50 +02:00
Ferdinand Majerech 58b42750aa scanYAMLDirectiveNumber now scans to slice. 2014-07-26 18:08:39 +02:00
Ferdinand Majerech e055506b29 nothrow and some @nogc in tag directive scanning. 2014-07-26 17:48:50 +02:00
Ferdinand Majerech d190b9d839 scanDirective now uses a slice. 2014-07-26 17:37:20 +02:00
Ferdinand Majerech f48d254350 Updated copyright statement in parser.d 2014-07-26 16:43:39 +02:00
Ferdinand Majerech 388b74b332 Stripped spaces. 2014-07-26 16:43:02 +02:00
Ferdinand Majerech db7fecf960 directiveToken no longer stores multiple values by zero-separating. 2014-07-26 16:41:04 +02:00
Ferdinand Majerech b5259e6ada Directive type is now a Token data member. 2014-07-26 16:38:15 +02:00
Ferdinand Majerech 3ae7c713ef Added a directive type enum. 2014-07-26 16:37:38 +02:00
Ferdinand Majerech 27bccabca4 scanDirectiveIgnoredLine is now nothrow @nogc. 2014-07-26 13:42:22 +02:00
Ferdinand Majerech 5133257201 scanAnchor is now nothrow. 2014-07-26 13:31:31 +02:00
Ferdinand Majerech 60e0270ffa A function to simplify building 'expected, but found' error messages. 2014-07-26 13:18:03 +02:00
Ferdinand Majerech cf014150ca Renamed setError() to error() for more compact error handling. 2014-07-26 13:06:35 +02:00
Ferdinand Majerech 33110e295e scanAlphaNumeric, scanDirectiveName are now nothrow @nogc. 2014-07-26 12:50:58 +02:00
Ferdinand Majerech e256d4c004 Removed the no longer used Appender from Scanner. 2014-07-26 04:24:30 +02:00
Ferdinand Majerech f9ede1c409 scanAlphaNumeric and callers now work with slices. 2014-07-26 04:20:32 +02:00
Ferdinand Majerech 8b086caa40 Default scanToNextBreak now only skips, doesn't scan anything. 2014-07-26 03:16:27 +02:00
Ferdinand Majerech ccdbc21e8f Style 2014-07-26 03:16:01 +02:00
Ferdinand Majerech 08f8168889 SliceBuilder assert fixes. 2014-07-26 03:07:32 +02:00
Ferdinand Majerech acc7617fab Forgotten SliceBuilder methods that enable new Scanner code. 2014-07-26 03:06:51 +02:00
Ferdinand Majerech 09b11470ac scanBlockScalar is now nothrow. 2014-07-26 02:53:05 +02:00
Ferdinand Majerech 6e2b9a7511 Code determining if a func scanned anything replaced by checking slice length. 2014-07-26 02:49:52 +02:00
Ferdinand Majerech 0ce9dc0b3a lineBreak is a dchar instead of an array now. 2014-07-26 02:41:42 +02:00
Ferdinand Majerech 701b01dd20 Removed non-slice scanBlockScalarBreaks. 2014-07-26 02:34:28 +02:00
Ferdinand Majerech f2cda9e799 Style. 2014-07-26 02:34:02 +02:00
Ferdinand Majerech a19131417e Updated alternate commented out code in scanBlockScalar 2014-07-26 02:33:49 +02:00
Ferdinand Majerech fb93ad7cf1 scanBlockScalar now reads to a slice... and is a lot more complicated. 2014-07-26 02:33:16 +02:00
Ferdinand Majerech 7bbd5ab5b3 Style. 2014-07-26 02:30:05 +02:00
Ferdinand Majerech e38120c6db A version of scanToNextBreak that reads to a slice. 2014-07-26 02:27:11 +02:00
Ferdinand Majerech 6dbe9ad4ae Refactored 2 alternate slices in scanBlockScalar into one. 2014-07-25 23:50:04 +02:00
Ferdinand Majerech 0aa321f8c5 A ToSlice version of scanBlockScalarBreaks. 2014-07-25 23:48:28 +02:00
Ferdinand Majerech 537c3c06f3 scanBlockScalarIndentation now scans into caller's slice. 2014-07-25 23:45:47 +02:00
Ferdinand Majerech 45468bff68 @nogc scanBlockScalarBreaks/scanBlockScalarIndentation. 2014-07-25 23:40:18 +02:00
Ferdinand Majerech 3cf56c8061 scanBlockScalarIgnoredLine is now nothrow @nogc. 2014-07-25 21:22:44 +02:00
Ferdinand Majerech b5bbd2a03b Style fixes. 2014-07-25 21:15:14 +02:00
Ferdinand Majerech ea3b696a8e scanBlockScalarIndicators is now @nogc. 2014-07-25 21:12:33 +02:00
Ferdinand Majerech 537eccc597 scanTag is now nothrow. 2014-07-25 18:28:08 +02:00
Ferdinand Majerech 4e3619cf6a Using buildMsg to simplify error messages. 2014-07-25 18:27:21 +02:00
Ferdinand Majerech 1b5eea58bf Style. 2014-07-25 18:26:23 +02:00
Ferdinand Majerech 93a99ad7ca A shortcut function to build error messages. 2014-07-25 18:26:08 +02:00
Ferdinand Majerech 6403b2da63 scanTagURI is now nothrow (not @nogc due to std.utf.decode) 2014-07-25 17:33:54 +02:00
Ferdinand Majerech f12e0104a6 Removed an unneeded import 2014-07-25 17:30:51 +02:00
Ferdinand Majerech b3ef48f41f printNoGC now supports const(dchar). 2014-07-25 17:30:35 +02:00
Ferdinand Majerech fe33be52e4 scanTagHandle is now nothrow @nogc. 2014-07-25 16:55:15 +02:00
Ferdinand Majerech 3574555c3a Fixed a recent bug. 2014-07-25 16:54:46 +02:00
Ferdinand Majerech 86e6628fa1 Doc fixes. 2014-07-25 16:54:06 +02:00
Ferdinand Majerech 46255846e6 Using printNoGC to simplify @nogc error message building. 2014-07-25 16:53:40 +02:00
Ferdinand Majerech 2420b57281 Updated nogcutil doc/copyright. 2014-07-25 16:52:47 +02:00
Ferdinand Majerech 963d197093 Utilities around AppenderNoGCFixed to build error messages easily without GC. 2014-07-25 16:52:36 +02:00
Ferdinand Majerech 5f27ab26c7 A gutted, @nogc version of Appender. 2014-07-25 16:51:56 +02:00
Ferdinand Majerech cac40a6a85 scanTag scans into a slice,tag handle/suffix are split by valueDivider, not \0 2014-07-25 03:36:55 +02:00
Ferdinand Majerech 918395ea64 Enforcing that Token is at most 32 bytes long. 2014-07-25 03:33:27 +02:00
Ferdinand Majerech e88842573f New Token data member for splitting token value when we need 2 values. 2014-07-25 03:33:08 +02:00
Ferdinand Majerech 2228e92a43 scanTagURI now scans into a slice started by the caller. 2014-07-25 02:51:06 +02:00
Ferdinand Majerech 7865e0b480 scanURIEscapesToSlice now returns the number of scanned characters. 2014-07-25 02:49:33 +02:00
Ferdinand Majerech 817dc3b610 scanTagURI now scans to a slice, as does scanURIEscapes, at cost of complexity 2014-07-25 02:34:53 +02:00
Ferdinand Majerech 457cabbb72 scanTagHandle now scans to a slice. 2014-07-25 02:32:29 +02:00
Ferdinand Majerech 9fe84bf729 Style fixes. 2014-07-24 23:22:26 +02:00
Ferdinand Majerech b63c0849e7 More @safe. 2014-07-24 23:22:14 +02:00
Ferdinand Majerech 4ed4a2c746 scanFlowScalar is now nothrow and only does one GC allocation. 2014-07-24 23:21:59 +02:00
Ferdinand Majerech a59a34ffce scanFlowScalarNonSpaces is now nothrow @nogc. 2014-07-24 23:21:07 +02:00
Ferdinand Majerech 48f31d6971 Doc fixes. 2014-07-24 23:20:31 +02:00
Ferdinand Majerech 1a31b3c7d2 Added an integer parsing function that doesn't use the GC. 2014-07-24 23:20:01 +02:00
Ferdinand Majerech bed862c8ab Turned some escapes associative arrays into switch functions to avoid GC. 2014-07-24 23:18:49 +02:00
Ferdinand Majerech 19f163a150 Added a buffer to construct error messages in without allocation. 2014-07-24 23:17:24 +02:00
Ferdinand Majerech f9eb7b2eb1 scanFlowScalarNonSpaces errors are now thrown by the caller. 2014-07-24 18:56:22 +02:00
Ferdinand Majerech fb20ca1006 scanFlowScalarSpaces is now nothrow @nogc. 2014-07-24 18:49:34 +02:00
Ferdinand Majerech 039d601a5f Flow scalar tokens are now scanned into slices. 2014-07-24 18:46:21 +02:00
Ferdinand Majerech 706ce872b0 scanPlain doc fix. 2014-07-24 18:44:20 +02:00
Ferdinand Majerech 571eecd836 setError use in scanPlain. 2014-07-24 18:44:07 +02:00
Ferdinand Majerech 1969dc0e97 Space fix. 2014-07-24 18:43:46 +02:00
Ferdinand Majerech 45d8db08d1 Use of throwIfError for handling scanPlain errors. 2014-07-24 18:43:33 +02:00
Ferdinand Majerech 60c3079f11 Functions to simplify error setting/throwing in Scanner. 2014-07-24 18:42:55 +02:00
Ferdinand Majerech 33e509659d Minor doc fix. 2014-07-24 18:42:12 +02:00
Ferdinand Majerech e816b93419 More const in exception.d 2014-07-24 18:41:55 +02:00
Ferdinand Majerech ab868df785 Better Scanner function attributes. 2014-07-24 03:50:39 +02:00
Ferdinand Majerech 02494914e4 dchar[], not dstring in Reader/Scanner. Will be changed back where possible. 2014-07-24 03:06:24 +02:00
Ferdinand Majerech 7ae6098bd9 Space fix. 2014-07-24 02:44:53 +02:00
Ferdinand Majerech 2d445dbc22 Plain scalars are now scanned into Reader slices, without allocations. 2014-07-24 02:44:43 +02:00
Ferdinand Majerech a2cbb90d4e SliceBuilder is now a part of Reader. 2014-07-24 02:43:28 +02:00
Ferdinand Majerech d8f1221457 Transactions in SliceBuilder to allow reverting of eager slice changes. 2014-07-24 02:43:09 +02:00
Ferdinand Majerech 892aed303f An API to build slices into read parts of Reader buffer. 2014-07-24 02:42:34 +02:00
Ferdinand Majerech e493e7299d Reader buffer is again dchar[]. 2014-07-24 02:40:32 +02:00
Ferdinand Majerech 36e7954756 Code calling scanPlain() assumes scanPlain() writes exception into errorData_. 2014-07-23 18:28:57 +02:00
Ferdinand Majerech d4a7b066d0 Scanner style fixes. 2014-07-23 18:26:39 +02:00
Ferdinand Majerech 2a8f78f46f Scanner data members for @nogc/nothrow functions to write exception data to. 2014-07-23 18:25:59 +02:00
Ferdinand Majerech be942564d9 Using utf32To8 2014-07-23 18:19:35 +02:00
Ferdinand Majerech f6457f2321 Added a nothrow function to convert dstring to string. 2014-07-23 18:18:21 +02:00
Ferdinand Majerech ba5d5bb3da A struct storing constructor parameters for MarkedYAMLException. 2014-07-23 18:16:05 +02:00
Ferdinand Majerech f5e027e9bb Better func attributes for exceptions. 2014-07-23 18:15:37 +02:00
Ferdinand Majerech 8f00c503e2 Exception style changes. 2014-07-23 18:15:13 +02:00
Ferdinand Majerech f8c1d0204b More style fixes in Scanner. 2014-07-23 03:10:25 +02:00
Ferdinand Majerech 0a7d21f1c6 More @safe pure in Scanner. 2014-07-23 03:09:48 +02:00
Ferdinand Majerech 30d394b861 Copyright headers in Token, Scanner. 2014-07-23 02:54:50 +02:00
Ferdinand Majerech 15f5add86d @safe pure nothrow @nogc and style in Token. 2014-07-23 02:54:34 +02:00
Ferdinand Majerech 8a378471e6 More @safe pure nothrow @nogc in Scanner. 2014-07-23 02:47:46 +02:00
Ferdinand Majerech aadf3232f0 Scanner style. 2014-07-23 02:46:36 +02:00
Ferdinand Majerech 10120b53c2 Static nested function in Scanner to avoid deleg overhead. 2014-07-23 02:18:00 +02:00
Ferdinand Majerech 90320cb040 Scanner error string fix. 2014-07-23 02:17:36 +02:00
Ferdinand Majerech 9671da901e Scanner doc/style fixes. 2014-07-23 02:17:19 +02:00
Ferdinand Majerech ae7331c710 Reader.buffer_ is now a dstring. 2014-07-23 01:49:11 +02:00
Ferdinand Majerech 98c66857bb const(dstring) was redundant. 2014-07-23 01:36:38 +02:00
Ferdinand Majerech 0a625ec7a7 Rewritten UTFDecoder into a function. 2014-07-23 01:36:09 +02:00
Ferdinand Majerech b060699950 Removed a GC allocation. 2014-07-23 00:46:37 +02:00
Ferdinand Majerech 66741654c3 More pure nothrow @nogc. 2014-07-23 00:46:00 +02:00
Ferdinand Majerech 949a396248 A risky Reader change to avoid allocations/exceptions. 2014-07-23 00:42:49 +02:00
Ferdinand Majerech 3ce23f2892 Better Reader docs. 2014-07-23 00:41:43 +02:00
Ferdinand Majerech 86c015fb5a Minor simplification. 2014-07-23 00:41:14 +02:00
Ferdinand Majerech 48f86653dc More @safe pure nothrow @nogc in Reader. 2014-07-23 00:40:00 +02:00
Ferdinand Majerech 16b486c623 FastCharSearch is now @nogc. 2014-07-23 00:38:51 +02:00
Ferdinand Majerech 53b22c93ad Reader now reuses the buffer created by UTFDecoder. 2014-07-23 00:09:40 +02:00
Ferdinand Majerech 9940bc91b9 Really minor whitespace change. 2014-07-23 00:06:06 +02:00
Ferdinand Majerech 9119836fa2 UTFDecoder now decodes everything at once. 2014-07-22 20:21:17 +02:00
Ferdinand Majerech 4ff3f8dc51 Optimized updateBuffer() for UTF-16/UTF-32 2014-07-22 03:41:46 +02:00
Ferdinand Majerech 3b6891dbe1 Reader is now more @safe. 2014-07-22 03:34:17 +02:00
Ferdinand Majerech 08a0a551d9 very minor whitespace change. 2014-07-22 03:33:50 +02:00
Ferdinand Majerech 81aee496ac UTFDecoder is now pure nothrow and @safer. 2014-07-22 03:33:36 +02:00
Ferdinand Majerech 7affea320a Rewroted UTFDecoder to enable nothrow. 2014-07-22 03:32:52 +02:00
Ferdinand Majerech 6e71d77e69 Localizes std.stream imports only where they are needed. 2014-07-22 02:40:44 +02:00
Ferdinand Majerech 630585970d Updated docs/exceptions; using a buffer, not a stream. 2014-07-22 02:40:14 +02:00
Ferdinand Majerech e30f6e0e80 UTFDecoder now works directly with a buffer, not a stream. 2014-07-22 02:39:02 +02:00
Ferdinand Majerech 7d4df103a7 Renamed UTFDecoder.buffer_ to decodedBuffer_ . 2014-07-22 02:18:26 +02:00
Ferdinand Majerech c296a6e790 MemoryStream now constructed in UTFDecoder. 2014-07-22 02:15:33 +02:00
Ferdinand Majerech e525ac120a Stripped whitespace in Scanner. 2014-07-22 02:12:18 +02:00
Ferdinand Majerech dadd67eeb0 Removed @property in UTFDecoder. 2014-07-22 02:11:31 +02:00
Ferdinand Majerech 5f9f12a672 Reader no longer has direct access to MemoryStream. 2014-07-22 02:11:16 +02:00
Ferdinand Majerech 2728e63eb8 more @nogc in Reader 2014-07-22 01:23:15 +02:00
Ferdinand Majerech 9dd6903e13 Better function attribs in Mark 2014-07-22 01:22:56 +02:00
Ferdinand Majerech 9bf9a0c278 Stripped whitespace. 2014-07-22 01:10:23 +02:00
Ferdinand Majerech 72afe53ab8 Reader is now using MemoryStream, using tinyendian to fix endianness issues. 2014-07-22 01:09:27 +02:00
Ferdinand Majerech e9a18c62b0 Doc fix. 2014-07-22 01:04:44 +02:00
Ferdinand Majerech 43026e6c13 Fixed a recent commit. 2014-07-22 01:03:19 +02:00
Ferdinand Majerech dc7f50d1ac A module for backwards compatibility with std.stream. 2014-07-22 01:01:37 +02:00
Ferdinand Majerech 3bb486de0b More commit style/whitespace changes. 2014-07-22 00:41:13 +02:00
Ferdinand Majerech 1d81148aef Whitespace changes. 2014-07-22 00:33:17 +02:00
Ferdinand Majerech 7af0292fd4 Import tinyendian and use UTFEncoding instead of Encoding in the UTF decoder 2014-07-22 00:23:15 +02:00
Ferdinand Majerech de0af4899b Copyright string update. 2014-07-22 00:21:42 +02:00
Ferdinand Majerech 45a59aba85 Encoding now refers to tinyendian. 2014-07-21 23:41:27 +02:00
Ferdinand Majerech 13f2e5c125 Added a self-contained module to handle endianness fixing. 2014-07-21 23:40:44 +02:00
Ferdinand Majerech 8abea5a08f doc fix 2014-07-21 09:58:16 +02:00
Ferdinand Majerech 0ac28e05bd const instead of in 2014-07-21 09:57:59 +02:00
Ferdinand Majerech 94919339fa Stripped Reader whitespace. 2014-07-21 09:56:41 +02:00
Ferdinand Majerech 9888925d23 Reader test reading a 1-byte file. 2014-07-21 09:54:08 +02:00
Ferdinand Majerech d77646555d More generic reader tests. 2014-07-21 09:53:28 +02:00
Ferdinand Majerech 882df6148a Doc fix in Loader. 2014-07-19 15:39:36 +02:00
Ferdinand Majerech a990771991 Whitespace and assert improvements in Reader. 2014-07-19 15:39:27 +02:00
Ferdinand Majerech 2332290950 Better @safe pure nothrow @nogc in Reader. 2014-07-19 15:38:43 +02:00
Ferdinand Majerech 4961cb163f assumeSafeAppend in Loader functions to reduce GC usage. 2014-07-19 14:49:13 +02:00
Ferdinand Majerech a7f5aa1cf2 Minor doc reformat. 2014-07-19 14:45:50 +02:00
Ferdinand Majerech bf4762cbcf Low-hanging @nogc fruit in Loader. 2014-07-19 14:41:30 +02:00
Ferdinand Majerech 647fe9b657 Removed @property from Loader. 2014-07-19 14:39:49 +02:00
Ferdinand Majerech a50907b0bd Loader whitespace fixes. 2014-07-19 14:38:35 +02:00
Ferdinand Majerech d2fe876316 Loader doc style update. 2014-07-19 14:32:16 +02:00
Ferdinand Majerech bc7519f561 Fixed deprecation errors for DMD 2.066 2014-07-19 04:17:18 +02:00
Ferdinand Majerech aae11e029c More const and better comments in constructor.d 2014-07-19 03:51:14 +02:00
Ferdinand Majerech 85c5a1bdb8 Stripped whitespace. 2014-07-19 03:50:50 +02:00
Ferdinand Majerech 69e8c71516 Fixed a deprecation error in constructor.d 2014-07-19 03:50:09 +02:00
Ferdinand Majerech 424035601c Doc style changes in constructor.d 2014-07-19 03:49:21 +02:00
Ferdinand Majerech d8f19ffc33 A quick hack to get D:YAML to work with DMD 2.066 beta 4 2014-07-19 03:07:45 +02:00
Ferdinand Majerech e6755e6615 Minor unittest improvement. 2014-07-19 02:00:04 +02:00
Ferdinand Majerech 4a76d4b886 assumeSafeAppend to decrease GC usage. 2014-07-19 01:59:26 +02:00
Ferdinand Majerech 7fa53704c5 Doc fix in constructor.d 2014-07-19 01:58:48 +02:00
Ferdinand Majerech 28979baa6c Doc style change in node.d 2014-07-19 01:58:24 +02:00
Ferdinand Majerech 7ae4de4776 Removed a pragma(msg) and fixed a minor tab/space issue 2014-05-20 23:19:02 +02:00
Ferdinand Majerech fc0aba516d Should fix issues 17 and 18 (although I couldn't reproduce them). 2014-05-20 22:30:39 +02:00
Ferdinand Majerech ba1093ba58 "Nonstandard" API to allow reading and modification of node styles. 2014-05-19 19:54:36 +02:00
Ferdinand Majerech f45323473c Node size info at compile-time 2014-05-19 19:53:33 +02:00
Ferdinand Majerech cd7d60bb0e Stripped whitespaces in node.d 2014-05-19 19:53:18 +02:00
Ferdinand Majerech 2a11c235d9 Dumper: reduced purity/@safety (DMD 2.064) 2013-12-17 15:18:47 +01:00
Ferdinand Majerech 06324bd5a4 More exception purity. 2013-12-17 15:18:03 +01:00
Ferdinand Majerech e0e9082615 Loader ctors no longer pure (DMD 2.054) 2013-12-17 15:17:42 +01:00
Ferdinand Majerech 369c899e90 Node.Pair opCmp hack due to a DMD 2.054 linker error bug. 2013-12-17 15:17:15 +01:00
Ferdinand Majerech 3a4d1e7627 Exception ctor purity. 2013-12-17 15:16:43 +01:00
Ferdinand Majerech c772609e13 Representer ctor no longer pure due to DMD 2.054 2013-12-17 15:15:58 +01:00
Ferdinand Majerech 7be10a44bf addRepresenter is now pure. 2013-12-17 15:15:36 +01:00
Ferdinand Majerech a341340d6c Using the dyaml.all module instead of yaml (which will eventually be removed). 2013-12-17 15:09:19 +01:00
Kiith-Sa 85a0e2c0a3 Nothrow Node isValid, isScalar, isSequence, isMapping, isUserType, isNull 2013-10-16 23:16:41 +02:00
Kiith-Sa 28918d242d Nothrow Node userValue, value. 2013-10-16 23:15:41 +02:00
Kiith-Sa 7b96993497 Nothrow Node hasEqualType, convertsTo, nodeTypeString 2013-10-16 23:15:23 +02:00
Kiith-Sa e88b716d89 Nothrow Node.type and Node.isType. 2013-10-16 23:14:37 +02:00
Kiith-Sa 2f0c75f72e Nothrow Node opAssign. 2013-10-16 23:14:02 +02:00
Kiith-Sa 4ecc4104da Minor opBinaryRight style, doc & test changes. 2013-09-09 22:39:46 +02:00
Nathan M. Swan cd0c9f54a0 Add 'in' operator for mappings 2013-09-09 11:46:42 -08:00
Kiith-Sa a0a09597ef Fixed DMD 2.053 immutable warning. 2013-05-31 00:23:23 +02:00
Kiith-Sa a409cceeff DMD 2.053 compatibility. 2013-05-23 14:33:34 +02:00
Kiith-Sa 2e3c6fe445 DUB forced property fix. 2013-04-24 01:32:16 +02:00
Jonathan M Davis 7a1e1ecce3 Another attempt at making d-yaml work with dub.
Creating a symlink in source to the dyaml directory does not actually
result in a symlink when another package grabs d-yaml as a dependency
via dub, and even if it did, it wouldn't work on Windows. So, this moves
the source into source so that it'll actually work, and cdc.d has been
adjusted accordingly so that building with it should still work.
2013-03-28 21:33:13 -07:00
Nathan M. Swan 9058cea2f3 Make D-YAML a dub package. 2013-02-22 23:02:31 -09:00