From 55e66f5ad1fecb02bcb9782265303e20756b5cb9 Mon Sep 17 00:00:00 2001 From: Stefan Rado Date: Tue, 18 Feb 2014 22:07:42 +0100 Subject: [PATCH] Rename Scanner and Parser classes to SourceScanner and SourceParser to avoid naming conflicts. --- Tools/px4params/px_process_params.py | 10 +++++----- Tools/px4params/srcparser.py | 2 +- Tools/px4params/{scanner.py => srcscanner.py} | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) rename Tools/px4params/{scanner.py => srcscanner.py} (96%) diff --git a/Tools/px4params/px_process_params.py b/Tools/px4params/px_process_params.py index 7799f63484..8503a2f4ce 100755 --- a/Tools/px4params/px_process_params.py +++ b/Tools/px4params/px_process_params.py @@ -39,19 +39,19 @@ # definitions, and outputs list of parameters in XML and DokuWiki formats. # -import scanner +import srcscanner import srcparser import output_xml import output_dokuwiki_tables import output_dokuwiki_listings # Initialize parser -prs = srcparser.Parser() +parser = srcparser.SourceParser() # Scan directories, and parse the files -sc = scanner.Scanner() -sc.ScanDir("../../src", prs) -groups = prs.GetParamGroups() +scanner = srcscanner.SourceScanner() +scanner.ScanDir("../../src", parser) +groups = parser.GetParamGroups() # Output into XML out = output_xml.XMLOutput(groups) diff --git a/Tools/px4params/srcparser.py b/Tools/px4params/srcparser.py index 9e202d3b87..0a4d21d264 100644 --- a/Tools/px4params/srcparser.py +++ b/Tools/px4params/srcparser.py @@ -72,7 +72,7 @@ class Parameter(object): """ return self.fields.get(code) -class Parser(object): +class SourceParser(object): """ Parses provided data and stores all found parameters internally. """ diff --git a/Tools/px4params/scanner.py b/Tools/px4params/srcscanner.py similarity index 96% rename from Tools/px4params/scanner.py rename to Tools/px4params/srcscanner.py index 43fd35e600..d7eca72d72 100644 --- a/Tools/px4params/scanner.py +++ b/Tools/px4params/srcscanner.py @@ -2,7 +2,7 @@ import os import re import codecs -class Scanner(object): +class SourceScanner(object): """ Traverses directory tree, reads all source files, and passes their contents to the Parser.