From 48e136999efe918c3eac609d23f706a801a149e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20K=C4=99dzia?= <pawel.kedzia@pwr.wroc.pl>
Date: Fri, 3 Dec 2010 13:14:16 +0100
Subject: [PATCH] Renamed rule for parsing string operator

---
 libwccl/parser/grammar.g | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/libwccl/parser/grammar.g b/libwccl/parser/grammar.g
index 444b379..7a3555e 100644
--- a/libwccl/parser/grammar.g
+++ b/libwccl/parser/grammar.g
@@ -134,7 +134,7 @@ parse_strset_operator
 	res.reset(new ANTLRParserResult<StrSet>());
 	boost::shared_ptr<Function<StrSet> > op;
 }
-	: op = string_operator [tagset, *res->variables.get()] {
+	: op = strset_operator [tagset, *res->variables.get()] {
 		res->op = op;
 	}
 	EOF
@@ -662,7 +662,7 @@ position_condition
 // Stiring operator
 // Returns boost::shared_ptr<Function<StrSet> >
 ///////////////////////////////////////////////////////////////////////////////
-string_operator [const Corpus2::Tagset& tagset, Variables& vars]
+strset_operator [const Corpus2::Tagset& tagset, Variables& vars]
 	returns [boost::shared_ptr<Function<StrSet> > ret]
 	: ret = strset_orth      [tagset, vars] 
 	| ret = strset_base      [tagset, vars]
@@ -672,7 +672,7 @@ string_operator [const Corpus2::Tagset& tagset, Variables& vars]
 	| ret = strset_var_val   [tagset, vars] 
 	| ret = strset_condition [tagset, vars]
 	//
-	| LPAREN ret = string_operator [tagset, vars] RPAREN
+	| LPAREN ret = strset_operator [tagset, vars] RPAREN
 ;
 
 // ----------------------------------------------------------------------------
@@ -709,7 +709,7 @@ strset_lower
 {
 	boost::shared_ptr<Function<StrSet> > o_ret;
 }
-	: "lower" LPAREN o_ret = string_operator [tagset, vars] RPAREN {
+	: "lower" LPAREN o_ret = strset_operator [tagset, vars] RPAREN {
 		ret.reset(new ToLower(o_ret));
 	}
 ;
@@ -722,7 +722,7 @@ strset_upper
 {
 	boost::shared_ptr<Function<StrSet> > o_ret;
 }
-	: "upper" LPAREN o_ret = string_operator [tagset, vars] RPAREN {
+	: "upper" LPAREN o_ret = strset_operator [tagset, vars] RPAREN {
 		ret.reset(new ToUpper(o_ret));
 	}
 ;
@@ -737,7 +737,7 @@ strset_affix
 	boost::shared_ptr<Function<StrSet> > o_ret;
 }
 	: "affix" LPAREN 
-			o_ret = string_operator [tagset, vars] COMMA offset = number 
+			o_ret = strset_operator [tagset, vars] COMMA offset = number 
 		RPAREN {
 			ret.reset(new Affix(o_ret, offset));
 		}
@@ -764,8 +764,8 @@ strset_condition
 	boost::shared_ptr<Function<StrSet> > p_true, p_false;
 }
 	: "if" LPAREN test  = bool_operator [tagset, vars] COMMA 
-							p_true  = string_operator   [tagset, vars] 
-							(COMMA p_false = string_operator [tagset, vars])? 
+							p_true  = strset_operator   [tagset, vars] 
+							(COMMA p_false = strset_operator [tagset, vars])? 
 	RPAREN {
 		if (p_false) {
 			op.reset(new Conditional<StrSet>(test, p_true, p_false));
@@ -775,7 +775,7 @@ strset_condition
 		}
 	}
 	| Q_MARK 
-			p_true = string_operator [tagset, vars]
+			p_true = strset_operator [tagset, vars]
 		Q_MARK 
 			test = bool_operator [tagset, vars] {
 			op.reset(new Conditional<StrSet>(test, p_true));
@@ -886,7 +886,7 @@ bool_regex
 }
 	: "regex" 
 		LPAREN 
-			expr = string_operator [tagset, vars] COMMA reg: STRING 
+			expr = strset_operator [tagset, vars] COMMA reg: STRING 
 		RPAREN {
 			op.reset(new Regex(expr, token_ref_to_ustring(reg)));
 		}
@@ -965,10 +965,10 @@ equal_operator
 			}
 		)
 	|
-		(string_operator [tagset, vars]) =>
+		(strset_operator [tagset, vars]) =>
 		(
-			s1 = string_operator [tagset, vars] COMMA  
-			s2 = string_operator [tagset, vars] {
+			s1 = strset_operator [tagset, vars] COMMA  
+			s2 = strset_operator [tagset, vars] {
 				op.reset(new Equals<StrSet>(s1, s2));
 			}
 		)
@@ -1004,8 +1004,8 @@ in_operator
 		)
 		|
 		(
-			s1 = string_operator [tagset, vars] COMMA
-			s2 = string_operator [tagset, vars] {
+			s1 = strset_operator [tagset, vars] COMMA
+			s2 = strset_operator [tagset, vars] {
 				op.reset(new IsSubsetOf<StrSet>(s1, s2));
 			}
 		)
@@ -1033,8 +1033,8 @@ inter_operator
 		)
 	|
 		(
-			s1 = string_operator [tagset, vars] COMMA  
-			s2 = string_operator [tagset, vars]  {
+			s1 = strset_operator [tagset, vars] COMMA  
+			s2 = strset_operator [tagset, vars]  {
 				op.reset(new Intersects<StrSet>(s1, s2));
 			}
 		)
@@ -1102,7 +1102,7 @@ strset_setvar
 }
 	: ret_acc = strset_variable_acc [vars]
 	  COMMA 
-		ret_op  = string_operator [tagset, vars] {
+		ret_op  = strset_operator [tagset, vars] {
 			op.reset(new VarSetter<StrSet>(*ret_acc.get(), ret_op));
 		}
 ;
-- 
GitLab