From 457758d92d0e3d9f95fb6b3e32d9947d99c04d7e Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Mon, 21 Jun 2021 13:03:10 -1000 Subject: [PATCH] Regularized the spellings of DEBUG_*_YAML_* --- Grbl_Esp32/src/Configuration/ParserHandler.h | 10 +++++----- Grbl_Esp32/src/Configuration/Tokenizer.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Grbl_Esp32/src/Configuration/ParserHandler.h b/Grbl_Esp32/src/Configuration/ParserHandler.h index a4feadce..27f04d81 100644 --- a/Grbl_Esp32/src/Configuration/ParserHandler.h +++ b/Grbl_Esp32/src/Configuration/ParserHandler.h @@ -25,7 +25,7 @@ #include "../Logging.h" -//#define DEBUG_YAML_VERBOSE_PARSER +// #define DEBUG_VERBOSE_YAML_PARSER // #define DEBUG_CHATTY_YAML_PARSER namespace Configuration { class ParserHandler : public Configuration::HandlerBase { @@ -45,7 +45,7 @@ namespace Configuration { // than entryIndent, there are some subordinate tokens. _parser.Tokenize(); int thisIndent = _parser.token_.indent_; -#ifdef DEBUG_YAML_VERBOSE_PARSER +#ifdef DEBUG_VERBOSE_YAML_PARSER log_debug("thisIndent " << _parser.key().str() << " " << thisIndent); #endif @@ -56,7 +56,7 @@ namespace Configuration { // If thisIndent > entryIndent, the new token is the first token within // this section so we process tokens at the same level as thisIndent. 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 " << _parser.token_.indent_); #endif @@ -64,7 +64,7 @@ namespace Configuration { log_info("Skipping key " << _parser.key().str() << " indent " << _parser.token_.indent_ << " thisIndent " << thisIndent); } else { -#ifdef DEBUG_YAML_VERBOSE_PARSER +#ifdef DEBUG_VERBOSE_YAML_PARSER log_debug("Parsing key " << _parser.key().str()); #endif section->group(*this); @@ -89,7 +89,7 @@ namespace Configuration { _parser.token_.state = TokenState::Held; #ifdef DEBUG_CHATTY_YAML_PARSER - log_debug("Left section at indent " << entryIndent); + log_debug("Left section at indent " << entryIndent << " holding " << _parser.key().str()); #endif } diff --git a/Grbl_Esp32/src/Configuration/Tokenizer.cpp b/Grbl_Esp32/src/Configuration/Tokenizer.cpp index c45626cb..2b57ce8b 100644 --- a/Grbl_Esp32/src/Configuration/Tokenizer.cpp +++ b/Grbl_Esp32/src/Configuration/Tokenizer.cpp @@ -50,7 +50,7 @@ namespace Configuration { // Release a held token if (token_.state == TokenState::Held) { token_.state = TokenState::Matching; -#ifdef DEBUG_YAML_VERBOSE_TOKENIZER +#ifdef DEBUG_VERBOSE_YAML_TOKENIZER log_debug("Releasing " << key().str()); #endif return; @@ -128,7 +128,7 @@ namespace Configuration { // token_.indent_ = indent; if (IsEndLine()) { -#ifdef DEBUG_YAML_VERBOSE_TOKENIZER +#ifdef DEBUG_VERBOSE_YAML_TOKENIZER log_debug("Section " << StringRange(token_.keyStart_, token_.keyEnd_).str()); #endif @@ -147,7 +147,7 @@ namespace Configuration { ParseError("Did not find matching delimiter"); } Inc(); -#ifdef DEBUG_YAML_VERBOSE_TOKENIZER +#ifdef DEBUG_VERBOSE_YAML_TOKENIZER log_debug("StringQ " << StringRange(token_.keyStart_, token_.keyEnd_).str() << " " << StringRange(token_.sValueStart_, token_.sValueEnd_).str()); #endif @@ -160,7 +160,7 @@ namespace Configuration { if (token_.sValueEnd_ != token_.sValueStart_ && token_.sValueEnd_[-1] == '\r') { --token_.sValueEnd_; } -#ifdef DEBUG_YAML_VERBOSE_TOKENIZER +#ifdef DEBUG_VERBOSE_YAML_TOKENIZER log_debug("String " << StringRange(token_.keyStart_, token_.keyEnd_).str() << " " << StringRange(token_.sValueStart_, token_.sValueEnd_).str()); #endif