From: Amos Jeffries Date: Wed, 21 May 2014 17:46:04 +0000 (-0700) Subject: Docs: formalize Tokenizer uniform method behaviour X-Git-Tag: SQUID_3_5_0_1~217^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d811da5e7a73bd5260a80724e4cd2c2975b1615;p=thirdparty%2Fsquid.git Docs: formalize Tokenizer uniform method behaviour --- diff --git a/src/parser/Tokenizer.h b/src/parser/Tokenizer.h index a2e6b7d5b9..a1dbdefb2d 100644 --- a/src/parser/Tokenizer.h +++ b/src/parser/Tokenizer.h @@ -10,7 +10,12 @@ namespace Parser { /** * Lexical processor to tokenize a buffer. * - * Allows arbitrary delimiters and token character sets to be provided by callers. + * Allows arbitrary delimiters and token character sets to + * be provided by callers. + * + * All methods start from the beginning of the input buffer. + * Methods returning true consume bytes from the buffer. + * Methods returning false have no side-effects. */ class Tokenizer { public: @@ -25,12 +30,6 @@ public: /// reinitialize processing for a new buffer void reset(const SBuf &newBuf) { buf_ = newBuf; } - /* - * The following methods start from the beginning of the input buffer. - * They return true and consume parsed chars if a non-empty token is found. - * Otherwise, they return false without any side-effects. - */ - /** Basic strtok(3): * Skips all leading delimiters (if any), * accumulates all characters up to the next delimiter (a token), and