Skip to content
Snippets Groups Projects
user avatar
Nat Goodspeed authored
We didn't have any tokenizer suitable for scanning something like a bash
command line. We do have a couple hacks, e.g. LLExternalEditor::tokenize() and
LLCommandLineParser::parseCommandLineString(). Both try to work around
boost::tokenizer limitations; but existing boost::tokenizer support just
doesn't address this case. Neither of the above is available as a general
scanner anyway, and parseCommandLineString() fails outright when passed "".
New getTokens() also distinguishes between "drop delimiters" (e.g. space,
return, newline) to be discarded from the token stream, versus "keep
delimiters" (e.g. "+-*/") to be returned as tokens in their own right.
There's an overload that honors escapes and a more efficient one that doesn't;
each has a convenience overload that returns the scanned string vector rather
than requiring a separate declaration.
Tweak and comment older getTokens() implementation.
Add unit tests for both old and new getTokens() implementations.
Break out StringVec and std::ostream << StringVec from
indra/llcommon/tests/listener.h to StringVec.h: that's coming in handy for a
number of different TUT test sources.
025329b6
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..
tests
CMakeLists.txt
bitpack.cpp
bitpack.h
ctype_workaround.h
doublelinkedlist.h
imageids.cpp
imageids.h
indra_constants.cpp
indra_constants.h
is_approx_equal_fraction.h
linden_common.h
linked_lists.h
ll_template_cast.h
llaccountingcost.h
llagentconstants.h
llallocator.cpp
llallocator.h
llallocator_heap_profile.cpp
llallocator_heap_profile.h
llapp.cpp
llapp.h
llapr.cpp
llapr.h
llassettype.cpp
llassettype.h
llassoclist.h
llavatarconstants.h
llavatarname.cpp
llavatarname.h
llbase32.cpp
llbase32.h
llbase64.cpp
llbase64.h
llboost.h
llchat.h
llclickaction.h
llcommon.cpp
llcommon.h
llcommonutils.cpp
llcommonutils.h
llcoros.cpp
llcoros.h
llcrc.cpp
llcrc.h
llcriticaldamp.cpp
llcriticaldamp.h
llcursortypes.cpp
llcursortypes.h
lldarray.h
lldarrayptr.h
lldate.cpp
lldate.h
lldefs.h
lldeleteutils.h
lldependencies.cpp
lldependencies.h
lldepthstack.h
lldictionary.cpp
lldictionary.h
lldlinked.h
lldoubledispatch.h
lldqueueptr.h
llendianswizzle.h
llenum.h
llerror.cpp
llerror.h
llerrorcontrol.h
llerrorlegacy.h
llerrorthread.cpp
llerrorthread.h
llevent.cpp
llevent.h
lleventapi.cpp
lleventapi.h
lleventcoro.cpp
lleventcoro.h
lleventdispatcher.cpp
lleventdispatcher.h
lleventemitter.h
lleventfilter.cpp
lleventfilter.h
llevents.cpp
llevents.h
lleventtimer.cpp
lleventtimer.h
llextendedstatus.h
llfasttimer.h
llfasttimer_class.cpp
llfasttimer_class.h
llfile.cpp
llfile.h
llfindlocale.cpp
llfindlocale.h
llfixedbuffer.cpp
llfixedbuffer.h
llfoldertype.cpp
llfoldertype.h
llformat.cpp
llformat.h