Commit Graph

13 Commits

Author SHA1 Message Date
Dick Hollenbeck 6bf3d7cdc3 Implement "KiCad s-epression" support for boost::property_tree's ptree, the 8
bit string version of property_tree. The ram resident structure of the ptree is
mostly compatible with one created using the xml_parser from
boost::property_tree, with slight differences in the way atoms are stored. The
result is you can use Format() to convert from xml to s-expression, but not the
other way around. You can write a simple s-expression beautifier in just a few
lines of code.

The main value however is the s-expression parser, i.e. Scan(), which is an
alternative to crafting a custom recursive descent parser for a particular
grammar. The tipping point depends on whether you want to read only a small
portion of a much larger document. If so, then using the ptree will likely be a
"faster to code" route. Documentation on how to navigate a ptree can be found on
the boost website and there are a number of examples in the
pcbnew/eagle_plugin.cpp file in this project. Powerful path navigation support
makes it easy to extract a subset of a ptree.
2013-04-08 16:04:45 -05:00
Miguel Angel Ajo da9e6b1679 checkcoding.py refactor from Edwin van den Oetelaar, some extra refactorings by me, improvement suggestions from Carl Poirier 2013-03-18 12:22:31 +01:00
Miguel Angel Ajo ecc6a69f4f Also check coding style of new files, not only modified ones 2013-03-16 00:28:35 +01:00
Miguel Angel Ajo 6c614e2996 tool for checking coding style 2013-03-16 00:21:53 +01:00
Dick Hollenbeck 210a7036db switch all <math.h> includes to <cmath> includes on an attempt to dodge some abiguous references to atan2() 2012-09-21 12:02:54 -05:00
Dick Hollenbeck 44ced95e66 This change fixes a compile error on MSVC 2012-09-20 08:15:12 -05:00
Dick Hollenbeck f94a95ab5b use the same format string in the test program as in LEGACY_PLUGIN for record keeping purposes 2012-06-25 09:44:47 -05:00
Dick Hollenbeck e5452a7a39 remove "long double" dependency, mingw was falling over when using it. 2012-06-24 13:41:37 -05:00
Dick Hollenbeck e06ce757b7 bzr add test program to verify new conversion strategy 2012-06-23 19:44:02 -05:00
Dick Hollenbeck 4b596cc5f3 legacy_plugin was not round tripping nanometers, add test program to verify new conversion strategy 2012-06-23 18:21:03 -05:00
Dick Hollenbeck 879f85aa7c move boost update script to out of way place, fix bug in it 2012-05-16 07:01:40 -05:00
Dick Hollenbeck 3fa7c200b7 Add tools/parser_gen.cpp which is the beginnings of an s-expression parser
generation tool.  For now, it is just an s-expression beautifier using
our "non-specctra mode" version of s-expressions.
2012-04-29 21:57:48 -05:00
Dick Hollenbeck 7fd0f0cab5 add tools directory, move container_test.cpp there on standby 2012-01-23 09:25:46 -06:00