mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-31 10:01:48 +02:00
Regularized the spellings of DEBUG_*_YAML_*
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "../Logging.h"
|
#include "../Logging.h"
|
||||||
|
|
||||||
//#define DEBUG_YAML_VERBOSE_PARSER
|
// #define DEBUG_VERBOSE_YAML_PARSER
|
||||||
// #define DEBUG_CHATTY_YAML_PARSER
|
// #define DEBUG_CHATTY_YAML_PARSER
|
||||||
namespace Configuration {
|
namespace Configuration {
|
||||||
class ParserHandler : public Configuration::HandlerBase {
|
class ParserHandler : public Configuration::HandlerBase {
|
||||||
@@ -45,7 +45,7 @@ namespace Configuration {
|
|||||||
// than entryIndent, there are some subordinate tokens.
|
// than entryIndent, there are some subordinate tokens.
|
||||||
_parser.Tokenize();
|
_parser.Tokenize();
|
||||||
int thisIndent = _parser.token_.indent_;
|
int thisIndent = _parser.token_.indent_;
|
||||||
#ifdef DEBUG_YAML_VERBOSE_PARSER
|
#ifdef DEBUG_VERBOSE_YAML_PARSER
|
||||||
log_debug("thisIndent " << _parser.key().str() << " " << thisIndent);
|
log_debug("thisIndent " << _parser.key().str() << " " << thisIndent);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ namespace Configuration {
|
|||||||
// If thisIndent > entryIndent, the new token is the first token within
|
// If thisIndent > entryIndent, the new token is the first token within
|
||||||
// this section so we process tokens at the same level as thisIndent.
|
// this section so we process tokens at the same level as thisIndent.
|
||||||
for (; _parser.token_.indent_ >= thisIndent; _parser.Tokenize()) {
|
for (; _parser.token_.indent_ >= thisIndent; _parser.Tokenize()) {
|
||||||
#ifdef DEBUG_YAML_VERBOSE_PARSER
|
#ifdef DEBUG_VERBOSE_YAML_PARSER
|
||||||
log_debug(" KEY " << _parser.key().str() << " state " << int(_parser.token_.state) << " indent "
|
log_debug(" KEY " << _parser.key().str() << " state " << int(_parser.token_.state) << " indent "
|
||||||
<< _parser.token_.indent_);
|
<< _parser.token_.indent_);
|
||||||
#endif
|
#endif
|
||||||
@@ -64,7 +64,7 @@ namespace Configuration {
|
|||||||
log_info("Skipping key " << _parser.key().str() << " indent " << _parser.token_.indent_ << " thisIndent "
|
log_info("Skipping key " << _parser.key().str() << " indent " << _parser.token_.indent_ << " thisIndent "
|
||||||
<< thisIndent);
|
<< thisIndent);
|
||||||
} else {
|
} else {
|
||||||
#ifdef DEBUG_YAML_VERBOSE_PARSER
|
#ifdef DEBUG_VERBOSE_YAML_PARSER
|
||||||
log_debug("Parsing key " << _parser.key().str());
|
log_debug("Parsing key " << _parser.key().str());
|
||||||
#endif
|
#endif
|
||||||
section->group(*this);
|
section->group(*this);
|
||||||
@@ -89,7 +89,7 @@ namespace Configuration {
|
|||||||
|
|
||||||
_parser.token_.state = TokenState::Held;
|
_parser.token_.state = TokenState::Held;
|
||||||
#ifdef DEBUG_CHATTY_YAML_PARSER
|
#ifdef DEBUG_CHATTY_YAML_PARSER
|
||||||
log_debug("Left section at indent " << entryIndent);
|
log_debug("Left section at indent " << entryIndent << " holding " << _parser.key().str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ namespace Configuration {
|
|||||||
// Release a held token
|
// Release a held token
|
||||||
if (token_.state == TokenState::Held) {
|
if (token_.state == TokenState::Held) {
|
||||||
token_.state = TokenState::Matching;
|
token_.state = TokenState::Matching;
|
||||||
#ifdef DEBUG_YAML_VERBOSE_TOKENIZER
|
#ifdef DEBUG_VERBOSE_YAML_TOKENIZER
|
||||||
log_debug("Releasing " << key().str());
|
log_debug("Releasing " << key().str());
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
@@ -128,7 +128,7 @@ namespace Configuration {
|
|||||||
|
|
||||||
// token_.indent_ = indent;
|
// token_.indent_ = indent;
|
||||||
if (IsEndLine()) {
|
if (IsEndLine()) {
|
||||||
#ifdef DEBUG_YAML_VERBOSE_TOKENIZER
|
#ifdef DEBUG_VERBOSE_YAML_TOKENIZER
|
||||||
log_debug("Section " << StringRange(token_.keyStart_, token_.keyEnd_).str());
|
log_debug("Section " << StringRange(token_.keyStart_, token_.keyEnd_).str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ namespace Configuration {
|
|||||||
ParseError("Did not find matching delimiter");
|
ParseError("Did not find matching delimiter");
|
||||||
}
|
}
|
||||||
Inc();
|
Inc();
|
||||||
#ifdef DEBUG_YAML_VERBOSE_TOKENIZER
|
#ifdef DEBUG_VERBOSE_YAML_TOKENIZER
|
||||||
log_debug("StringQ " << StringRange(token_.keyStart_, token_.keyEnd_).str() << " "
|
log_debug("StringQ " << StringRange(token_.keyStart_, token_.keyEnd_).str() << " "
|
||||||
<< StringRange(token_.sValueStart_, token_.sValueEnd_).str());
|
<< StringRange(token_.sValueStart_, token_.sValueEnd_).str());
|
||||||
#endif
|
#endif
|
||||||
@@ -160,7 +160,7 @@ namespace Configuration {
|
|||||||
if (token_.sValueEnd_ != token_.sValueStart_ && token_.sValueEnd_[-1] == '\r') {
|
if (token_.sValueEnd_ != token_.sValueStart_ && token_.sValueEnd_[-1] == '\r') {
|
||||||
--token_.sValueEnd_;
|
--token_.sValueEnd_;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG_YAML_VERBOSE_TOKENIZER
|
#ifdef DEBUG_VERBOSE_YAML_TOKENIZER
|
||||||
log_debug("String " << StringRange(token_.keyStart_, token_.keyEnd_).str() << " "
|
log_debug("String " << StringRange(token_.keyStart_, token_.keyEnd_).str() << " "
|
||||||
<< StringRange(token_.sValueStart_, token_.sValueEnd_).str());
|
<< StringRange(token_.sValueStart_, token_.sValueEnd_).str());
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user