Commit Graph

32 Commits

Author SHA1 Message Date
Dr. Andre Vehreschild
13626af92a Fix escaping anchors in keys (#1101) 2022-04-21 08:19:51 -05:00
Dr. Andre Vehreschild
4c982d59dc Improve build and fix single cr on windows (#1099) 2022-04-19 12:39:55 -05:00
Dr. Andre Vehreschild
a6db7e32ac Fix single cr not recognized (#1094)
Complies with YAML Standard [5.4](https://yaml.org/spec/1.2.2/#54-line-break-characters) [25] instead of matching `\r` only in combination with `\n`.
2022-03-31 22:16:35 -05:00
Chen
026a53fbe1 Parse colon in plain scalar correctly when in a flow collection
Fixes #740.
2020-07-02 14:08:14 -05:00
Raúl Gutiérrez Segalés
f05b2577ad Fix crash when parsing {x: (#865) 2020-05-23 12:17:20 -05:00
Ted Lyngmo
0d5c57150c Apply formatting/style tweaks to comply with compile time diagnostics for g++ and clang++ (#686)
* Add compilation flags: -Wshadow -Weffc++ -pedantic -pedantic-errors
* Delete implicit copy & move constructors & assignment operators
  in classes with pointer data members.
* An exception to the above: Add default copy & move constructors &
  assignment operators for the Binary class.
* Convert boolean RegEx operators to binary operators.
* Initialize all members in all classes in ctors.
* Let default ctor delegate to the converting ctor in
  Binary and RegEx
* Don't change any tests except regex_test (as a result of the change
  to binary operators).

Note: https://bugzilla.redhat.com/show_bug.cgi?id=1544675 makes
-Weffc++ report a false positive in "include/yaml-cpp/node/impl.h".
2019-03-13 15:18:34 -07:00
Denis Gladkikh
cfb7606a84 Fix tag parsing with () (#532) 2018-01-28 10:18:55 -06:00
Scott Wolchok
005a6a19ee Avoid copying cached RegExes for scalars
This improves performance on the test.yaml attached to #158 by about
25% on my machine as compared to the previous commit (0.25s -> 0.20s),
as measured by `time build/util/parse < test.yaml > /dev/null`.
2016-01-30 18:32:00 -06:00
Scott Wolchok
8c35a8ffab Cache scalar regexes
This improves performance on the test.yaml attached to #158 by about
35% on my machine (0.39s -> 0.25s), as measured by
`time build/util/parse < test.yaml > /dev/null`.
2016-01-30 18:31:55 -06:00
Jesse Beder
5fd25df859 Run IWYU 2014-03-22 22:46:04 -05:00
Jesse Beder
32125697f2 Rename regex.h and regex.cpp to regex_yaml, so they don't interfere with the posix variant 2014-03-22 19:03:49 -05:00
Jesse Beder
9b4db068bb Run clang-format 2014-03-22 12:49:16 -05:00
Jesse Beder
8c517bf0fd Fixed parsing ? when attached to a scalar 2012-11-08 19:11:41 -06:00
Jesse Beder
97fa02a484 Disallowed a plain scalar with just a dash 2012-01-11 16:39:24 -06:00
Jesse Beder
62634f53ec Fixed emitter bug with colon at the end of a scalar in a flow collection 2011-10-31 19:16:17 -05:00
Jesse Beder
3e94c0a037 Switched the 'pragma once' to only happen on MSVC, or gcc >= 3.4 (it was causing trouble on the sun compiler) 2011-09-06 00:16:03 -05:00
Jesse Beder
f34d60ca65 Flipped the include guard and the pragma, and don't use the pragma for early versions of gcc (< 3.4) 2011-03-02 06:11:41 +00:00
Jesse Beder
be1b14f369 Added Anchor() regex (so that we're not just using Alphanumeric to match anchors), but it's still not 100% right (it shouldn't allow non-printable characters, e.g.). Also fixed a test that was broken along these lines (if a colon immediately follows an anchor, it's part of the anchor) 2011-01-31 17:47:20 +00:00
Jesse Beder
54b68230ae Small bug from switching static initialized regexes to lazy ones 2009-11-12 05:45:47 +00:00
Jesse Beder
9a21a3ec8d Switched the Exp:: regexes to functions that lazily evaluate their regexes 2009-11-04 22:56:59 +00:00
Jesse Beder
fadc2ad39f Implemented adjacent key:value pairs when the key is JSON-like 2009-10-29 21:05:48 +00:00
Jesse Beder
a372bfdc60 Merged r295:305 from the tags branch to the trunk 2009-10-29 15:48:06 +00:00
Jesse Beder
fa0af88dfe Merged r270:HEAD of the emitting-unicode branch 2009-10-19 23:31:11 +00:00
Jesse Beder
873ad336f8 Fixed bug with omitted keys/values in a flow map 2009-09-02 21:39:57 +00:00
Jesse Beder
7a89920441 Fixed null key/value bug, added tests 2009-07-30 06:49:09 +00:00
Jesse Beder
72919adf55 Added header file inclusion guards 2009-07-29 22:27:20 +00:00
Jesse Beder
9245f9253a Merged emitter branch into trunk, changes r105:r151 2009-05-22 21:52:31 +00:00
Jesse Beder
f9c0725684 Switched to reading the entire file into a buffer at the start.\nThis speeds it up a TON (like 100x). 2009-02-01 20:48:43 +00:00
Jesse Beder
a6d5902ebf Included <cstdio> for gcc-4.4 (issue 9) 2009-01-27 21:08:40 +00:00
Jesse Beder
45322566c7 Set the eol style to native for all files. 2008-09-03 22:20:39 +00:00
Jesse Beder
ec2ecad197 Added CMake scripts for other platforms\nFixed some bugs that gcc complained about\nFixed CR/LF vs LF bug 2008-08-07 03:30:56 +00:00
Jesse Beder
cadc04ce47 Moved all code to src/ and include/ directories. 2008-07-14 04:33:30 +00:00