From c062ea28b303ecbc3a9301007dd61669fd5d164e Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Wed, 3 Sep 2014 23:33:00 +0200
Subject: [PATCH] fix parameter names

---
 aconvert2/src/aconvert.cpp | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/aconvert2/src/aconvert.cpp b/aconvert2/src/aconvert.cpp
index 2bad6ee515..ed0e9473c9 100644
--- a/aconvert2/src/aconvert.cpp
+++ b/aconvert2/src/aconvert.cpp
@@ -21,13 +21,13 @@
 #include "GasTexConverter.h"
 
 #define AUTOMATON_FROM_STRING 1
-#define STRING_TO_AUTOMATON 2
+#define AUTOMATON_TO_STRING 2
 #define AUTOMATON_TO_DOT 3
 #define AUTOMATON_TO_GAS_TEX 4
 #define GRAMMAR_FROM_STRING 5
-#define STRING_TO_GRAMMAR 6
+#define GRAMMAR_TO_STRING 6
 #define REG_EXP_FROM_STRING 7
-#define STRING_TO_REG_EXP 8
+#define REG_EXP_TO_STRING 8
 
 void printHelp() {
 	std::cout << "Help" << std::endl;
@@ -63,7 +63,7 @@ int regexpFromString(std::istream& in, std::ostream& out) {
 	return 0;
 }
 
-int stringToAutomaton(std::istream& in, std::ostream& out) {
+int automatonToString(std::istream& in, std::ostream& out) {
 	try {
 		automaton::Automaton automaton = alib::DataFactory::fromStream<automaton::Automaton>(in);
 		automaton::FiniteAutomatonToStringComposer composer;
@@ -75,7 +75,7 @@ int stringToAutomaton(std::istream& in, std::ostream& out) {
 	return 0;
 }
 
-int stringToGrammar(std::istream& in, std::ostream& out) {
+int grammarToString(std::istream& in, std::ostream& out) {
 	try {
 		grammar::Grammar grammar = alib::DataFactory::fromStream<grammar::Grammar>(in);
 		grammar::GrammarToStringComposer composer;
@@ -87,7 +87,7 @@ int stringToGrammar(std::istream& in, std::ostream& out) {
 	return 0;
 }
 
-int stringToRegexp(std::istream& in, std::ostream& out) {
+int regexpToString(std::istream& in, std::ostream& out) {
 	try {
 		regexp::RegExp regexp = alib::DataFactory::fromStream<regexp::RegExp>(in);
 		regexp::RegExpToStringComposer composer;
@@ -133,13 +133,13 @@ int main(int argc, char* argv[]) {
 	while (1) {
 		static struct option long_options[] = {
 			{"automaton_from_string",	no_argument,	&fromTo, AUTOMATON_FROM_STRING},
-			{"string_to_automaton",	 	no_argument,	&fromTo, STRING_TO_AUTOMATON},
+			{"automaton_to_string",	 	no_argument,	&fromTo, AUTOMATON_TO_STRING},
 			{"automaton_to_dot",	 	no_argument,	&fromTo, AUTOMATON_TO_DOT},
 			{"automaton_to_gastex",	 	no_argument,	&fromTo, AUTOMATON_TO_GAS_TEX},
 			{"grammar_from_string",		no_argument,	&fromTo, GRAMMAR_FROM_STRING},
-			{"string_to_grammar",	 	no_argument,	&fromTo, STRING_TO_GRAMMAR},
+			{"grammar_to_string",	 	no_argument,	&fromTo, GRAMMAR_TO_STRING},
 			{"regexp_from_string",		no_argument,	&fromTo, REG_EXP_FROM_STRING},
-			{"string_to_regexp",	 	no_argument,	&fromTo, STRING_TO_REG_EXP},
+			{"regexp_to_string",	 	no_argument,	&fromTo, REG_EXP_TO_STRING},
 			{0, 0, 0, 0}
 		};
 	
@@ -169,20 +169,20 @@ more:
 	int res;
 	if(fromTo == AUTOMATON_FROM_STRING) {
 		res = automatonFromString(*in, std::cout);
-	} else if(fromTo == STRING_TO_AUTOMATON) {
-		res = stringToAutomaton(*in, std::cout);
+	} else if(fromTo == AUTOMATON_TO_STRING) {
+		res = automatonToString(*in, std::cout);
 	} else if(fromTo == AUTOMATON_TO_DOT) {
 		res = automatonToDot(*in, std::cout);
 	} else if(fromTo == AUTOMATON_TO_GAS_TEX) {
 		res = automatonToGasTex(*in, std::cout);
 	} else if(fromTo == GRAMMAR_FROM_STRING) {
 		res = grammarFromString(*in, std::cout);
-	} else if(fromTo == STRING_TO_GRAMMAR) {
-		res = stringToGrammar(*in, std::cout);
+	} else if(fromTo == GRAMMAR_TO_STRING) {
+		res = grammarToString(*in, std::cout);
 	} else if(fromTo == REG_EXP_FROM_STRING) {
 		res = regexpFromString(*in, std::cout);
-	} else if(fromTo == STRING_TO_REG_EXP) {
-		res = stringToRegexp(*in, std::cout);
+	} else if(fromTo == REG_EXP_TO_STRING) {
+		res = regexpToString(*in, std::cout);
 	} else {
 		printHelp();
 		res = 1;
-- 
GitLab