From 46a473be1c271061adf68f43fc4c9b58126e248c Mon Sep 17 00:00:00 2001 From: "Mike D. Lowis" Date: Wed, 30 May 2012 09:31:40 -0400 Subject: [PATCH] Renamed macro variables to syntax to reflect new nomenclature --- source/dlparser/dlparser.cpp | 8 ++++---- source/dlparser/dlparser.h | 4 ++-- source/visitors/expprocessor.cpp | 8 ++++---- source/visitors/expprocessor.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/source/dlparser/dlparser.cpp b/source/dlparser/dlparser.cpp index bdea06c..de53187 100644 --- a/source/dlparser/dlparser.cpp +++ b/source/dlparser/dlparser.cpp @@ -21,9 +21,9 @@ DLParser::~DLParser() { } -bool DLParser::isMacroName(void) +bool DLParser::isSyntaxName(void) { - return (macros.count( lookaheadToken(1).text() ) > 0); + return (syntaxes.count( lookaheadToken(1).text() ) > 0); } bool DLParser::isCoreFormName(void) @@ -73,7 +73,7 @@ AST* DLParser::Expression(void) } // Register any new syntaxes and expand any existing syntax uses - ExpProcessor processor( macros ); + ExpProcessor processor( syntaxes ); processor.visit( ret ); return ret; @@ -166,7 +166,7 @@ AST* DLParser::BasicExp(void) AST* ret = NULL; // Macro Expression - if ( isMacroName() ) + if ( isSyntaxName() ) { // Save current terminator diff --git a/source/dlparser/dlparser.h b/source/dlparser/dlparser.h index 0b48ee7..e18e487 100644 --- a/source/dlparser/dlparser.h +++ b/source/dlparser/dlparser.h @@ -10,11 +10,11 @@ class DLParser : public BTParser { private: std::map core_forms; - std::map macros; + std::map syntaxes; public: DLParser(); ~DLParser(); - bool isMacroName(void); + bool isSyntaxName(void); bool isCoreFormName(void); eTokenTypes getCoreFormId(void); void parse(void); diff --git a/source/visitors/expprocessor.cpp b/source/visitors/expprocessor.cpp index 78eb6c3..91decf3 100644 --- a/source/visitors/expprocessor.cpp +++ b/source/visitors/expprocessor.cpp @@ -1,6 +1,6 @@ #include "expprocessor.h" -ExpProcessor::ExpProcessor(std::map ¯os) : macro_registry(macros) +ExpProcessor::ExpProcessor(std::map &syntaxes) : syntax_registry(syntaxes) { } @@ -27,9 +27,9 @@ void ExpProcessor::afterChildren(AST* cur, int depth) if (cur->type() == SYNTAX) { std::string name = (*(cur->children()->begin()))->text(); - Syntax* macro = new Syntax(); - macro->name( name ); - macro_registry[ macro->name() ] = macro; + Syntax* syntax = new Syntax(); + syntax->name( name ); + syntax_registry[ syntax->name() ] = syntax; } } diff --git a/source/visitors/expprocessor.h b/source/visitors/expprocessor.h index 0c0b2f2..b8478fa 100644 --- a/source/visitors/expprocessor.h +++ b/source/visitors/expprocessor.h @@ -8,9 +8,9 @@ class ExpProcessor : public IVisitor { protected: - std::map& macro_registry; + std::map& syntax_registry; public: - ExpProcessor(std::map& macros); + ExpProcessor(std::map& syntaxes); private: void beforeVisit(AST* cur, int depth); void afterVisit(AST* cur, int depth); -- 2.52.0