Merge lp://staging/~thomir-deactivatedaccount/xpathselect/trunk-extend-type-name-options into lp://staging/xpathselect

Proposed by Thomi Richards
Status: Needs review
Proposed branch: lp://staging/~thomir-deactivatedaccount/xpathselect/trunk-extend-type-name-options
Merge into: lp://staging/xpathselect
Diff against target: 1347 lines (+609/-308)
8 files modified
lib/CMakeLists.txt (+2/-2)
lib/parser.cpp (+34/-1)
lib/parser.h (+55/-50)
lib/xpathquerypart.cpp (+129/-0)
lib/xpathquerypart.h (+57/-73)
lib/xpathselect.cpp (+69/-31)
test/test_parser.cpp (+241/-150)
test/test_xpath_tree.cpp (+22/-1)
To merge this branch: bzr merge lp://staging/~thomir-deactivatedaccount/xpathselect/trunk-extend-type-name-options
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Autopilot Hackers Pending
Review via email: mp+227854@code.staging.launchpad.net

Commit message

Extend xpathselect grammar to allow multiple node names per query.

Description of the change

This branch changes the XPathSelect grammar such that you can now say "get me all the nodes named X, Y, or Z at this location". This is required to work around a problem with versioned Qml objects, and is also useful in other scenarios.

This involved extending the boost::spirit grammar (in parser.h), which in turn meant re-working the parser return types to be different structs, and using boost::variant.

As you'd expect, tests have been added / updated.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Note: Please do not merge this. While this MP is considered complete, I need to write the autopilot-side of things, and I'd like to land the two at the same time to avoid back-and-forth merge proposals between the two projects.

Reviews are very welcome though :)

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

That's a whole lotta code to parse! A couple of probably useless comments for you though.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) :
Revision history for this message
Christopher Lee (veebers) wrote :

Just a quick look at this point, couple of inline comments re; TODOs. Deeper review to come.

65. By Thomi Richards

Code cleanups.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Pitt (pitti) wrote :

I didn't see anything obviously wrong with this, but then again my C++ skills are largely nonexisting, and most of the syntax is totally unfamiliar to me :/ Just two small and unimportant comments. But the test case coverage of this is quite good, and I suppose you'll test it together with the AP testsuite.

66. By Thomi Richards

Fix test as per MP comment.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

66. By Thomi Richards

Fix test as per MP comment.

65. By Thomi Richards

Code cleanups.

64. By Thomi Richards

Remove use of boost::optional that wasn't needed.

63. By Thomi Richards

whitespace-only change.

62. By Thomi Richards

Addded test, cleaned up the code a little bit.

61. By Thomi Richards

Remove some commented out code.

60. By Thomi Richards

Add missing file - whoops!

59. By Thomi Richards

Use a template function to remove some code.

58. By Thomi Richards

Hook up new xpathselect grammar, added test to those already present.

57. By Thomi Richards

Builds, and tests all pass again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: