relpath
= ( word [ push_back(path_, token_) ]
- % ch_p('/') )
- >> ( ! ch_p('/') [ push_back(path_, construct_<Token>()) ] )
+ % +ch_p('/') )
+ >> ( ! (+ch_p('/') ) [ push_back(path_, construct_<Token>()) ] )
;
abspath
- = ch_p('/') [ push_back(path_, construct_<Token>()) ]
+ = (+ch_p('/')) [ push_back(path_, construct_<Token>()) ]
>> ( relpath
| eps_p [ push_back(path_, construct_<Token>()) ] )
;
{
static char text[] =
"# Comment\n"
- "doo / bii / doo arg"
+ "doo / bii / // doo arg"
" flab::blub"
" 123.434>a"
" (a,b;c (huhu/{haha}))"
{
ss.str("");
BOOST_CHECK( boost::spirit::parse(
- "ls /foo/bar;",
+ "ls //foo/bar;",
grammar.use_parser<Grammar::CommandParser>(),
grammar.use_parser<Grammar::SkipParser>() ) . full );
BOOST_CHECK_EQUAL( ss.str(), "builtin_ls( None('')/Word('foo')/Word('bar') )\n" );
{
ss.str("");
BOOST_CHECK( boost::spirit::parse(
- "foo/bar/ {",
+ "foo/bar// {",
grammar.use_parser<Grammar::CommandParser>(),
grammar.use_parser<Grammar::SkipParser>() ) . full );
BOOST_CHECK_EQUAL( ss.str(),