{"action":"created","issue":{"url":"https://api.github.com/repos/djowel/spirit_x3/issues/14","labels_url":"https://api.github.com/repos/djowel/spirit_x3/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/djowel/spirit_x3/issues/14/comments","events_url":"https://api.github.com/repos/djowel/spirit_x3/issues/14/events","html_url":"https://github.com/djowel/spirit_x3/issues/14","id":117001505,"number":14,"title":"char_(ch, ch2) not inclusive","user":{"login":"klemens-morgenstern","id":8020376,"avatar_url":"https://avatars.githubusercontent.com/u/8020376?v=3","gravatar_id":"","url":"https://api.github.com/users/klemens-morgenstern","html_url":"https://github.com/klemens-morgenstern","followers_url":"https://api.github.com/users/klemens-morgenstern/followers","following_url":"https://api.github.com/users/klemens-morgenstern/following{/other_user}","gists_url":"https://api.github.com/users/klemens-morgenstern/gists{/gist_id}","starred_url":"https://api.github.com/users/klemens-morgenstern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klemens-morgenstern/subscriptions","organizations_url":"https://api.github.com/users/klemens-morgenstern/orgs","repos_url":"https://api.github.com/users/klemens-morgenstern/repos","events_url":"https://api.github.com/users/klemens-morgenstern/events{/privacy}","received_events_url":"https://api.github.com/users/klemens-morgenstern/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-15T16:18:55Z","updated_at":"2015-11-16T08:03:53Z","closed_at":null,"body":"The following parser does not parse a,z,A,Z,0,9 as part of an id without my workaround. The used version of boost.spirit is e95d80d682916779c88599c7f3ce197e5877cdaf.\r\n\r\n```cpp\r\nx3::rule<class id, std::string> const id(\"id\");\r\n\r\nauto const id_def =\r\n\t\tno_skip[\r\n\t\t\t(\r\n\t\t\t\tchar_('_') |\r\n\t\t\t\tchar_('A', 'Z') |\r\n\t\t\t\tchar_('a', 'z')\r\n\t\t\t\t//workaround\r\n\t\t\t\t| char_(\"AZaz\")\r\n\t\t \t ) >>\r\n\t\t\t*(\r\n\t\t\t\tchar_('_') |\r\n\t\t\t\tchar_('A', 'Z') |\r\n\t\t\t\tchar_('a', 'z') |\r\n\t\t\t\tchar_('0', '9')\r\n\t\t\t\t//workaround \r\n\t\t\t\t| char_(\"AZaz09\")\r\n\t\t\t )\r\n\t\t];\r\n\r\n\r\nBOOST_SPIRIT_DEFINE(id);\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/djowel/spirit_x3/issues/comments/156951067","html_url":"https://github.com/djowel/spirit_x3/issues/14#issuecomment-156951067","issue_url":"https://api.github.com/repos/djowel/spirit_x3/issues/14","id":156951067,"user":{"login":"klemens-morgenstern","id":8020376,"avatar_url":"https://avatars.githubusercontent.com/u/8020376?v=3","gravatar_id":"","url":"https://api.github.com/users/klemens-morgenstern","html_url":"https://github.com/klemens-morgenstern","followers_url":"https://api.github.com/users/klemens-morgenstern/followers","following_url":"https://api.github.com/users/klemens-morgenstern/following{/other_user}","gists_url":"https://api.github.com/users/klemens-morgenstern/gists{/gist_id}","starred_url":"https://api.github.com/users/klemens-morgenstern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klemens-morgenstern/subscriptions","organizations_url":"https://api.github.com/users/klemens-morgenstern/orgs","repos_url":"https://api.github.com/users/klemens-morgenstern/repos","events_url":"https://api.github.com/users/klemens-morgenstern/events{/privacy}","received_events_url":"https://api.github.com/users/klemens-morgenstern/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T08:03:53Z","updated_at":"2015-11-16T08:03:53Z","body":"Sure.\r\n\r\n```cpp\r\n#include <string>\r\n\r\n#define BOOST_TEST_MODULE test_id\r\n#include <boost/test/minimal.hpp>\r\n#include <iostream>\r\n#include <id.hpp>\r\n\r\nnamespace x3 = boost::spirit::x3;\r\n\r\n\r\nint test_main (int, char**)\r\n{\r\n\tstd::string s;\r\n\r\n\tauto beg = s.begin();\r\n\tauto itr = s.begin();\r\n\tauto end = s.begin();\r\n\r\n\tbool res;\r\n\r\n\tstd::string parsed;\r\n\r\n\tauto p = [&]\r\n\t\t{\r\n\t\t\tparsed.clear();\r\n\t\t\tbeg = s.begin();\r\n\t\t\titr = s.begin();\r\n\t\t\tend = s.end();\r\n\t\t\tres = x3::parse(itr, end, id, parsed);\r\n\t\t};\r\n\r\n\ts = \"dingz#asd\";\r\n\tp();\r\n\r\n\tBOOST_CHECK(res);\r\n\tBOOST_CHECK(itr == (beg + 5));\r\n\tBOOST_CHECK(parsed == \"dingz\"); //parses only \"ding\"\r\n\r\n\ts = \"part1 _ part2\";\r\n\tp();\r\n\r\n\tBOOST_CHECK(res);\r\n\tBOOST_CHECK(itr == (beg + 5));\r\n\tBOOST_CHECK(parsed == \"part1\"); //parses only \"p\"\r\n\r\n\treturn 0;\r\n}\r\n```\r\n\r\nAnd then of course the id.hpp looks like this:\r\n\r\n```cpp\r\n#include <boost/spirit/home/x3.hpp>\r\n#include <string>\r\n\r\nnamespace x3 = boost::spirit::x3;\r\nusing x3::string;\r\nusing x3::char_;\r\nusing x3::uint_;\r\nusing x3::eol;\r\nusing x3::eps;\r\nusing x3::no_skip;\r\nusing x3::space;\r\n\r\nx3::rule<class id, std::string> const id(\"id\");\r\n\r\nauto const id_def =\r\n\t\tno_skip[\r\n\t\t\t(\r\n\t\t\t\tchar_('_') |\r\n\t\t\t\tchar_('A', 'Z') |\r\n\t\t\t\tchar_('a', 'z')\r\n\t\t \t ) >>\r\n\t\t\t*(\r\n\t\t\t\tchar_('_') |\r\n\t\t\t\tchar_('A', 'Z') |\r\n\t\t\t\tchar_('a', 'z') |\r\n\t\t\t\tchar_('0', '9')\r\n\t\t\t )\r\n\t\t];\r\n\r\nBOOST_SPIRIT_DEFINE(id);\r\n```"}}