From c5dd1dfd51b5659f51f3b01e601a2a11941fdcaa Mon Sep 17 00:00:00 2001
From: Adam Wardynski <award@.(B-4.4.46a)>
Date: Tue, 19 Apr 2011 16:36:43 +0200
Subject: [PATCH] change match_value to match_literal etc. for consistency with
 literals of other types.

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

diff --git a/libwccl/parser/grammar.g b/libwccl/parser/grammar.g
index 857d405..24686c2 100644
--- a/libwccl/parser/grammar.g
+++ b/libwccl/parser/grammar.g
@@ -408,12 +408,12 @@ position_value
 // ----------------------------------------------------------------------------
 // Value used into match operator such as TOK[position] and ANN[position, name]
 // Returns boost::shared_ptr<Match>
-match_value
+match_literal
 	returns [boost::shared_ptr<Match> val]
 {
 	boost::shared_ptr<MatchData> m;
 }
-	: m = match_data_value {
+	: m = match_data_literal {
 		val.reset(new Match(m));
 	}
 ;
@@ -425,7 +425,7 @@ match_value_const
 {
 	boost::shared_ptr<Match> m;
 }
-	: m = match_value {
+	: m = match_literal {
 		val.reset(new Constant<Match>(*m));
 	}
 ;
@@ -433,16 +433,16 @@ match_value_const
 // ----------------------------------------------------------------------------
 // Value used into match operator such as TOK[position] and ANN[position, name]
 // Returns boost::shared_ptr<MatchData>
-match_data_value
+match_data_literal
 	returns [boost::shared_ptr<MatchData> val]
-	: val = token_match_value
-	| val = ann_match_value
-	| val = match_vector_value
+	: val = token_match_literal
+	| val = ann_match_literal
+	| val = match_vector_literal
 ;
 
-// token match value
+// token match literal - TOK[position]
 // Returns boost::shared_ptr<TokenMatch>
-token_match_value
+token_match_literal
 	returns [boost::shared_ptr<TokenMatch> val]
 {
 	boost::shared_ptr<Position> p;
@@ -452,9 +452,9 @@ token_match_value
 	}
 ;
 
-// annotation match value
+// annotation match literal - ANN[position, name]
 // Returns boost::shared_ptr<AnnotationMatch> 
-ann_match_value
+ann_match_literal
 	returns [boost::shared_ptr<AnnotationMatch> val]
 {
 	boost::shared_ptr<Position> p;
@@ -464,28 +464,28 @@ ann_match_value
 	}
 ;
 
-// annotation match vector: MATCH() or MATCH(token, ann, MATCH())
+// annotation match vector literal: MATCH() or MATCH(token, ann, MATCH())
 // Returns boost::shared_ptr<MatchVector>
-match_vector_value
+match_vector_literal
 	returns [boost::shared_ptr<MatchVector> val]
 {
 	val.reset(new MatchVector());
 }
-	: "MATCH" LPAREN (match_vector_value_item[val])? RPAREN
+	: "MATCH" LPAREN (match_vector_literal_item[val])? RPAREN
 ;
 
 // Body of the MATCH value. It only adds vector items to the MatchVector
 // Item may be single or multiple
-match_vector_value_item [boost::shared_ptr<MatchVector>& mvector]
+match_vector_literal_item [boost::shared_ptr<MatchVector>& mvector]
 {
 	boost::shared_ptr<Match> m_val;
 }
-	: m_val = match_value {
+	: m_val = match_literal {
 		mvector->append(m_val);
 	} 
 	(
 		COMMA
-		m_val = match_value {
+		m_val = match_literal {
 			mvector->append(m_val);
 		}
 	)*
@@ -1998,6 +1998,7 @@ match_action_comma_sep
 	)*
 ;
 
+
 // Function<Match> is wrapper for Constant<Match> and Function<Match>
 // Returns boost::shared_ptr<Function<Match> >
 match_fit
-- 
GitLab