Commit graph

259 commits

Author SHA1 Message Date
Ferdinand Majerech 7cf9dca57d Function to encode *valid* UTF-32 to UTF-8 2014-07-29 01:59:22 +02:00
Ferdinand Majerech cf15d55da0 Function to decode *valid* UTF-8 2014-07-29 01:58:59 +02:00
Ferdinand Majerech 53b39dc590 Updated copyright and description. 2014-07-29 01:58:22 +02:00
Ferdinand Majerech 6b8ff23859 A function to validate a UTF-8 string. 2014-07-29 01:58:00 +02:00
Ferdinand Majerech 61424b0ac6 A @nogc isValidDchar. 2014-07-29 01:57:07 +02:00
Ferdinand Majerech cac25207f1 parseNoGC can work with code points directly. 2014-07-29 01:55:43 +02:00
Ferdinand Majerech 6e1239fdac Removed unused/untested code from AppenderNoGCFixed. 2014-07-29 01:50:04 +02:00
Ferdinand Majerech 4a4e83112c utf8Stride is now globally visible in reader.d 2014-07-28 23:21:43 +02:00
Ferdinand Majerech 45b15890ca It should be enough to use \x instead of \u for \u0085 2014-07-28 23:19:59 +02:00
Ferdinand Majerech 645b191948 Removed todo garbage. 2014-07-26 23:38:59 +02:00
Ferdinand Majerech f07aaeef87 Reader UTF decoding is now private. 2014-07-26 23:37:56 +02:00
Ferdinand Majerech a8c32430ed Minor style. 2014-07-26 23:37:33 +02:00
Ferdinand Majerech ebe10ad8c4 Removed the Error and ErrorData aliases. 2014-07-26 23:31:13 +02:00
Ferdinand Majerech 2e7de5f9ed checkDocumentStart func attribs. 2014-07-26 23:30:13 +02:00
Ferdinand Majerech d5663b1e57 Scanner style. 2014-07-26 23:29:55 +02:00
Ferdinand Majerech f76e4cfd02 Queue copyright. 2014-07-26 23:25:08 +02:00
Ferdinand Majerech 424e6e5f98 Queue whitespaces. 2014-07-26 23:24:41 +02:00
Ferdinand Majerech 2688591c6a Better func attribs in Queue. 2014-07-26 23:23:59 +02:00
Ferdinand Majerech 9d480d1723 scanDirective is now nothrow and mostly @nogc. 2014-07-26 18:26:39 +02:00
Ferdinand Majerech 14a8e31fa5 Minor cleanup. 2014-07-26 18:20:57 +02:00
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