Issues with lexical analysis of _keywords_ in SequenceType #75

Closed
malteseduck opened this Issue Nov 14, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@malteseduck
Contributor

malteseduck commented Nov 14, 2013

There are some cases where the appearance of "div" seems to be recognized as the keyword instead of a reference to a div element. Here are cases that work just fine:

/xhtml:html/xhtml:body//xhtml:div

and

<div>Hi</div>

Here are cases that don't seem to work:

let $div as element(div) := <div/>
return
    $div

and

if (fn:empty($node/*:div)) then
    "bad"
else 
    "ok"

Thank you.

@ligasgr

This comment has been minimized.

Show comment
Hide comment
@ligasgr

ligasgr Nov 14, 2013

Owner

Hi,

This is just a subclass of two distinct problems (in fact three but for the last one there's already an issue raised -> #9 ):

  • some "keywords" not being tokenized fine when used in path expressions when used in conjunction with * wildcard
  • some "keywords" not being tokenized fine when used as types in SequenceType

The problem in general is that xquery is a context sensitive grammar and lexical analysis of such language is not an easy task.
I'll keep this one open (with title changed) to deal with the first issue and raise a new issue ( #76 ) for dealing with the second one.

Owner

ligasgr commented Nov 14, 2013

Hi,

This is just a subclass of two distinct problems (in fact three but for the last one there's already an issue raised -> #9 ):

  • some "keywords" not being tokenized fine when used in path expressions when used in conjunction with * wildcard
  • some "keywords" not being tokenized fine when used as types in SequenceType

The problem in general is that xquery is a context sensitive grammar and lexical analysis of such language is not an easy task.
I'll keep this one open (with title changed) to deal with the first issue and raise a new issue ( #76 ) for dealing with the second one.

@ligasgr ligasgr changed the title from Issues with lexical analysis of _keywords_ in path expressions to Issues with lexical analysis of _keywords_ in SequenceType May 11, 2014

@ligasgr ligasgr closed this in e31a172 May 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment