[plexippus-xpath-devel] Problem compiling xpath

Willem Broekema metawilm at gmail.com
Tue Nov 11 19:23:24 UTC 2008


On Tue, Nov 11, 2008 at 9:00 AM, David Lichteblau <david at lichteblau.com> wrote:
> Quoting Daniel Katz (dpkatz at gmail.com):
>> ; caught ERROR:
>> ;   (during macroexpansion of (YACC:DEFINE-PARSER *XPATH-PARSER* ...))
>> ;   The variable LAMBDA* is unbound.

> Thanks for the report.  I can reproduce it, but I'm pretty sure we are
> using cl-yacc correctly here.
>
> Unfortunately, current cl-yacc from darcs doesn't work with Plexippus
> anymore.  Apparently it doesn't recognize such functions in productions
> since this patch:
>
> Tue Mar 25 21:53:18 CET 2008  Willem Broekema <metawilm at gmail.com>
>  * Add :precedence option to productions.

That change of mine has caused this problem, indeed. Sorry about that.
I have just sent the following as proposed fix to Juliusz Chroboczek:

Tue Nov 11 20:10:58 CET 2008  Willem Broekema <metawilm at gmail.com>
  * fix_parse_production_precedence
diff -rN old-cl-yacc/yacc.lisp new-cl-yacc/yacc.lisp
1108,1109c1108,1110
<                  (list ;; (#'func :precedence pr)
<                   (values (car l) (getf (cdr l) :precedence)))
---
>                  (list (if (eq (second l) :precedence) ;; (#'func :precedence pr)
>                            (values (car l) (third l))
>                          (values l nil)))

That makes all plexippus-xpath tests pass on Allegro 8.1 (in ANSI
mode), except for the first which gives:

TEST FAILED:
  (XPATH:EVALUATE "count(//following::div) * 10 + count(//div|body/div)"
   (CXML:PARSE-ROD
"<html><body><span></span><br/><div></div></body></html>"
XPATH::*DOM-BUILDER*))
is expected to be
11.0d0
but was
11

- Willem




More information about the plexippus-xpath-devel mailing list