[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))))
- [elpa] 45/255: looking at a new method of parsing trees, (continued)
- [elpa] 45/255: looking at a new method of parsing trees, Eric Schulte, 2014/03/15
- [elpa] 44/255: indentation, Eric Schulte, 2014/03/15
- [elpa] 43/255: paren matching, Eric Schulte, 2014/03/15
- [elpa] 49/255: removed debug stuffs, Eric Schulte, 2014/03/15
- [elpa] 47/255: parsing of sgf files with alternative paths working, Eric Schulte, 2014/03/15
- [elpa] 48/255: all tests are passing, Eric Schulte, 2014/03/15
- [elpa] 52/255: more condensed collecting of games w/alternatives, Eric Schulte, 2014/03/15
- [elpa] 51/255: parsing large complex files, Eric Schulte, 2014/03/15
- [elpa] 39/255: passing all tests, Eric Schulte, 2014/03/15
- [elpa] 50/255: whitespace, Eric Schulte, 2014/03/15
- [elpa] 41/255: simplified parse-tree, but not done,
Eric Schulte <=
- [elpa] 53/255: passing all tests, Eric Schulte, 2014/03/15
- [elpa] 54/255: more parsing/syntax tweaks, Eric Schulte, 2014/03/15
- [elpa] 56/255: some utility functions, Eric Schulte, 2014/03/15
- [elpa] 55/255: new approach to parsing sgf files into elisp, Eric Schulte, 2014/03/15
- [elpa] 61/255: passing first 6 tests, Eric Schulte, 2014/03/15
- [elpa] 59/255: passing first two tests, Eric Schulte, 2014/03/15
- [elpa] 62/255: automatically normalize elisp sgf buffers, Eric Schulte, 2014/03/15
- [elpa] 58/255: able to load and play through games w/sgf2el, Eric Schulte, 2014/03/15
- [elpa] 60/255: passing first five tests, Eric Schulte, 2014/03/15
- [elpa] 64/255: passing all tests, Eric Schulte, 2014/03/15