Bugs item #1905745, was opened at 2008-03-02 16:53
Message generated for change (Comment added) made by teubner
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1905745&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PF/compiler
Group: Pathfinder 0.22
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ying Zhang (yingying)
Assigned to: Nobody/Anonymous (nobody)
Summary: PF: parsing problem: stack empty

Initial Comment:
Hi,

When compiling my query (see below), I get a parse error "stack empty".  This 
happens with both stable and current branch.

$ pf /tmp/tst.xq 
parse error: parsing problem: stack empty

# halted in /ufs/zhang/monet/current/pathfinder/compiler/parser/scanner.l 
(popState), line 232

$ cat /tmp/tst.xq 
import module namespace tst = "foo" at "/tmp/foo.xq";

for $i in ("abc", "xyz")
let $d := doc("proj.xml"),
    $u := $d//i,
    $r := $d//k,
    $used := $u,
    $returned := $r,
    $referred := $u,
    $upath := ("./title", "./year"),
    $rpath := ("./address", "./publisher")
return
tst:comparenodes( $used, $returned, $referred, $upath, $rpath, $u, $r) }

$ cat /tmp/foo.xq
module namespace f = "foo";

declare function f:comparenodes($u as node()*, $r as node()*) as node()*
{
    for $i in $u, $j in $r
    where $i is $j
    return $j
};

declare function f:comparenodes(
        $used as node()*, $returned as node()*, $referred as node()*,
        $upath as xs:string*, $rpath as xs:string*,
        $u as node()*, $r as node()* ) as node()*
{ f:comparenodes($u, $r) };


Compiling /tmp/foo.xq does not have any problem.  I'm using:

$ uname -a
Linux andorea.ins.cwi.nl 2.6.23.15-137.fc8 #1 SMP Sun Feb 10 17:03:13 EST 2008 
x86_64 x86_64 x86_64 GNU/Linux

Thanks!


Jennie

----------------------------------------------------------------------

>Comment By: Jens Teubner (teubner)
Date: 2008-03-02 17:32

Message:
Logged In: YES 
user_id=731390
Originator: NO

Note that your query contains a syntax error.  The `}' at
the end is too much.  But I agree the Pathfinder's parser
should report this differently.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1905745&group_id=56967

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to