[Crosstoolchain-logs] [device-tree-compiler] 161/357: DTC: Minor grammar rule shuffle.

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:09 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit 5641289a4647db43c0fdccee25da020ca04d03ad
Author: Jon Loeliger <jdl at freescale.com>
Date:   Tue Oct 23 09:28:54 2007 -0500

    DTC: Minor grammar rule shuffle.
    
    I like to see the basis cases established early in
    the rule sets, so place  "empty" reduction first.
    Purely cosmetic.
    
    Signed-off-by: Jon Loeliger <jdl at freescale.com>
    Acked-by: David Gibson <david at gibson.dropbear.id.au>
---
 dtc-parser.y | 62 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/dtc-parser.y b/dtc-parser.y
index 4698793..8e6ed64 100644
--- a/dtc-parser.y
+++ b/dtc-parser.y
@@ -87,13 +87,13 @@ sourcefile:
 	;
 
 memreserves:
-	  memreserve memreserves
+	  /* empty */
 		{
-			$$ = chain_reserve_entry($1, $2);
+			$$ = NULL;
 		}
-	| /* empty */
+	| memreserve memreserves
 		{
-			$$ = NULL;
+			$$ = chain_reserve_entry($1, $2);
 		}
 	;
 
@@ -123,13 +123,13 @@ nodedef:
 	;
 
 proplist:
-	  propdef proplist
+	  /* empty */
 		{
-			$$ = chain_property($1, $2);
+			$$ = NULL;
 		}
-	| /* empty */
+	| propdef proplist
 		{
-			$$ = NULL;
+			$$ = chain_property($1, $2);
 		}
 	;
 
@@ -165,7 +165,11 @@ propdata:
 	;
 
 propdataprefix:
-	  propdata ','
+	  /* empty */
+		{
+			$$ = empty_data;
+		}
+	| propdata ','
 		{
 			$$ = $1;
 		}
@@ -173,10 +177,6 @@ propdataprefix:
 		{
 			$$ = data_add_label($1, $2);
 		}
-	| /* empty */
-		{
-			$$ = empty_data;
-		}
 	;
 
 opt_cell_base:
@@ -188,7 +188,11 @@ opt_cell_base:
 	;
 
 celllist:
-	  celllist opt_cell_base DT_CELL
+	  /* empty */
+		{
+			$$ = empty_data;
+		}
+	| celllist opt_cell_base DT_CELL
 		{
 			$$ = data_append_cell($1,
 					      cell_from_string($3, $2));
@@ -201,14 +205,14 @@ celllist:
 		{
 			$$ = data_add_label($1, $2);
 		}
-	| /* empty */
-		{
-			$$ = empty_data;
-		}
 	;
 
 bytestring:
-	  bytestring DT_BYTE
+	  /* empty */
+		{
+			$$ = empty_data;
+		}
+	| bytestring DT_BYTE
 		{
 			$$ = data_append_byte($1, $2);
 		}
@@ -216,20 +220,16 @@ bytestring:
 		{
 			$$ = data_add_label($1, $2);
 		}
-	| /* empty */
-		{
-			$$ = empty_data;
-		}
 	;
 
 subnodes:
-	  subnode subnodes
+	  /* empty */
 		{
-			$$ = chain_node($1, $2);
+			$$ = NULL;
 		}
-	| /* empty */
+	|  subnode subnodes
 		{
-			$$ = NULL;
+			$$ = chain_node($1, $2);
 		}
 	;
 
@@ -252,13 +252,13 @@ nodename:
 	;
 
 label:
-	  DT_LABEL
+	  /* empty */
 		{
-			$$ = $1;
+			$$ = NULL;
 		}
-	| /* empty */
+	| DT_LABEL
 		{
-			$$ = NULL;
+			$$ = $1;
 		}
 	;
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list