emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 41/255: simplified parse-tree, but not done


From: Eric Schulte
Subject: [elpa] 41/255: simplified parse-tree, but not done
Date: Sun, 16 Mar 2014 01:02:15 +0000

eschulte pushed a commit to branch go
in repository elpa.

commit 9a9f131bbafa9efc0cebafc29f109c994dbad4e8
Author: Eric Schulte <address@hidden>
Date:   Thu May 17 22:41:02 2012 -0400

    simplified parse-tree, but not done
    
    It needs more work to parse be able to parse trees with alternative
    paths.
---
 sgf.el |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/sgf.el b/sgf.el
index 2c260a3..9bb065d 100644
--- a/sgf.el
+++ b/sgf.el
@@ -147,14 +147,10 @@
     (collect (parse-props (match-string 1 str)))))
 
 (defun parse-trees (str)
-  (let (cont-p)
-    (parse-many parse-tree-part-re str
-      (setq start (match-beginning 2))
-      (let ((tree-part (parse-nodes (match-string 1 str))))
-        (setq res (if cont-p
-                      (list tree-part res)
-                    (cons tree-part res)))
-        (setq cont-p (string= (match-string 2 str) "("))))))
+  (parse-many parse-tree-part-re str
+    (setq start (match-beginning 2))
+    (let ((tree-part (parse-nodes (match-string 1 str))))
+      (collect tree-part))))
 
 (defun read-from-buffer (buffer)
   (process (parse-trees (with-current-buffer buffer (buffer-string)))))
@@ -442,7 +438,7 @@
                                               neighbors neighbor-vals)))
          (already (cons piece already)))
     (or (some (lambda (v) (not (or (equal v enemy) ; touching open space
-                              (equal v val))))
+                                   (equal v val))))
               neighbor-vals)
         (some (lambda (n) (alive-p board n already)) ; touching alive dragon
               friendly-neighbors))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]