Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 141460 Details for
Bug 283214
[xpath2] Conditional Expressions cause XpathParserException
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Code changes in grammar file for this change
patch-283214-code.txt (text/plain), 8.07 KB, created by
Jesper Moller
on 2009-07-13 19:12:01 EDT
(
hide
)
Description:
Code changes in grammar file for this change
Filename:
MIME Type:
Creator:
Jesper Moller
Created:
2009-07-13 19:12:01 EDT
Size:
8.07 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.xml.xpath2.processor >Index: grammars/xpath.cup >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.xml.xpath2.processor/grammars/xpath.cup,v >retrieving revision 1.5 >diff -u -r1.5 xpath.cup >--- grammars/xpath.cup 3 Jul 2009 06:35:24 -0000 1.5 >+++ grammars/xpath.cup 13 Jul 2009 23:11:51 -0000 >@@ -13,7 +13,10 @@ > > package org.eclipse.wst.xml.xpath2.processor.internal; > >+import java.math.BigDecimal; >+import java.math.BigInteger; > import java.util.*; >+import org.eclipse.wst.xml.xpath2.processor.ast.XPath; > import org.eclipse.wst.xml.xpath2.processor.internal.ast.*; > import org.eclipse.wst.xml.xpath2.processor.internal.types.*; > >@@ -56,6 +59,8 @@ > terminal String AND, OR; > terminal EMPTY, ITEM, NODE, DOCUMENT_NODE, TEXT, COMMENT; > terminal PROCESSING_INSTRUCTION, SCHEMA_ATTRIBUTE, ELEMENT, SCHEMA_ELEMENT; >+// Unused in XPath 2, but reserved for compatibility with XQuery >+terminal TYPESWITCH; > > terminal BigInteger INTEGER; > terminal Double DOUBLE; >@@ -63,7 +68,7 @@ > terminal String STRING, NCNAME; > > >-non terminal String Prefix, LocalPart, NCName; >+non terminal String Prefix, LocalPart, NCName, UnqualifiedNCName, UnqualifiedLocalPart; > non terminal StringLiteral StringLiteral; > non terminal QName ElementDeclaration, ElementNameOrWildcard, TypeName, ElementName; > non terminal QName AttributeDeclaration, AttribNameOrWildcard, AttributeName; >@@ -630,10 +635,10 @@ > > TypeName ::= QName:n {: RESULT = n; :}; > >-IntegerLiteral ::= INTEGER:i {: RESULT = new IntegerLiteral(i.intValue()); :}; >+IntegerLiteral ::= INTEGER:i {: RESULT = new IntegerLiteral(i); :}; > > DecimalLiteral ::= DECIMAL:d >- {: RESULT = new DecimalLiteral(d.doubleValue()); :} >+ {: RESULT = new DecimalLiteral(d); :} > ; > > DoubleLiteral ::= DOUBLE:d >@@ -644,18 +649,16 @@ > > VarName ::= QName:n {: RESULT = n; :}; > >-QName ::= LocalPart:l {: RESULT = new QName(l); :} >+QName ::= UnqualifiedLocalPart:l {: RESULT = new QName(l); :} > | Prefix:p COLON LocalPart:l {: RESULT = new QName(p,l); :} >- >- // XXX hack to get empty working for now... >- // for fn:empty at least >- | Prefix:p COLON EMPTY {: RESULT = new QName(p, "empty"); :} >- ; >+ ; > > Prefix ::= NCName:n {: RESULT = n; :}; > > LocalPart ::= NCName:n {: RESULT = n; :}; > >+UnqualifiedLocalPart ::= UnqualifiedNCName:n {: RESULT = n; :}; >+ > NCName ::= NCNAME:n {: RESULT = n; :} | > TO:n {: RESULT = new String("to"); :} | > CHILD:n {: RESULT = new String("child"); :} | >@@ -693,5 +696,55 @@ > OR:n {: RESULT = new String("or"); :} | > DIV:n {: RESULT = new String("div"); :} | > IDIV:n {: RESULT = new String("idiv"); :} | >+ COMMENT:n {: RESULT = new String("comment"); :} | >+ DOCUMENT_NODE:n {: RESULT = new String("document-node"); :} | >+ ELEMENT:n {: RESULT = new String("element"); :} | >+ EMPTY:n {: RESULT = new String("empty"); :} | >+ ITEM:n {: RESULT = new String("item"); :} | >+ NODE:n {: RESULT = new String("node"); :} | >+ PROCESSING_INSTRUCTION:n {: RESULT = new String("processing-instruction"); :} | >+ SCHEMA_ATTRIBUTE:n {: RESULT = new String("schema-attribute"); :} | >+ SCHEMA_ELEMENT:n {: RESULT = new String("schema-element"); :} | >+ TEXT:n {: RESULT = new String("text"); :} | >+ TYPESWITCH:n {: RESULT = new String("typeswitch"); :} | >+ MOD:n {: RESULT = new String("mod"); :} >+ ; >+ >+UnqualifiedNCName ::= NCNAME:n {: RESULT = n; :} | >+ TO:n {: RESULT = new String("to"); :} | >+ CHILD:n {: RESULT = new String("child"); :} | >+ DESCENDANT:n {: RESULT = new String("descendant"); :} | >+ SELF:n {: RESULT = new String("self"); :} | >+ DESCENDANT_OR_SELF:n {: RESULT = new String("descendant-of-self"); :} | >+ FOLLOWING_SIBLING:n {: RESULT = new String("following-sibling"); :} | >+ FOLLOWING:n {: RESULT = new String("following"); :} | >+ NAMESPACE:n {: RESULT = new String("namespace"); :} | >+ PARENT:n {: RESULT = new String("parent"); :} | >+ ANCESTOR:n {: RESULT = new String("ancestor"); :} | >+ PRECEDING_SIBLING:n {: RESULT = new String("preceding-sibling"); :} | >+ PRECEDING:n {: RESULT = new String("preceding"); :} | >+ ANCESTOR_OR_SELF:n {: RESULT = new String("ancestor-or-self"); :} | >+ UNION:n {: RESULT = new String("union"); :} | >+ INTERSECT:n {: RESULT = new String("intersect"); :} | >+ EXCEPT:n {: RESULT = new String("except"); :} | >+ INSTANCE:n {: RESULT = new String("instance"); :} | >+ OF:n {: RESULT = new String("of"); :} | >+ TREAT:n {: RESULT = new String("as"); :} | >+ CASTABLE:n {: RESULT = new String("castable"); :} | >+ CAST:n {: RESULT = new String("cast"); :} | >+ IS:n {: RESULT = new String("is"); :} | >+ FOR:n {: RESULT = new String("for"); :} | >+ IN:n {: RESULT = new String("in"); :} | >+ RETURN:n {: RESULT = new String("return"); :} | >+ SATISFIES:n {: RESULT = new String("satisfies"); :} | >+ SOME:n {: RESULT = new String("some"); :} | >+ EVERY:n {: RESULT = new String("every"); :} | >+ THEN:n {: RESULT = new String("then"); :} | >+ ELSE:n {: RESULT = new String("else"); :} | >+ AND:n {: RESULT = new String("and"); :} | >+ OR:n {: RESULT = new String("or"); :} | >+ DIV:n {: RESULT = new String("div"); :} | >+ IDIV:n {: RESULT = new String("idiv"); :} | > MOD:n {: RESULT = new String("mod"); :} > ; >+ >\ No newline at end of file >Index: grammars/xpath.lex >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.xml.xpath2.processor/grammars/xpath.lex,v >retrieving revision 1.5 >diff -u -r1.5 xpath.lex >--- grammars/xpath.lex 3 Jul 2009 06:35:24 -0000 1.5 >+++ grammars/xpath.lex 13 Jul 2009 23:11:52 -0000 >@@ -152,7 +152,7 @@ > "schema\-attribute" { return symbol(XpathSym.SCHEMA_ATTRIBUTE); } > "element" { return symbol(XpathSym.ELEMENT); } > "schema\-element" { return symbol(XpathSym.SCHEMA_ELEMENT); } >- >+"typeswitch" { return symbol(XpathSym.TYPESWITCH); } > > {StringLiteral} { > // get rid of quotes >Index: build.xml >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.wst.xml.xpath2.processor/build.xml,v >retrieving revision 1.2 >diff -u -r1.2 build.xml >--- build.xml 3 Jul 2009 06:35:24 -0000 1.2 >+++ build.xml 13 Jul 2009 23:11:51 -0000 >@@ -1,16 +1,25 @@ > <project name="proj1" default="generate_parser" basedir="."> > <property name="src" location="${basedir}"/> >- <property name="cupJar" location="/home/dcarver/eclipse3.5/xsltworkspace/org.eclipse.wst.xml.xpath2.processor/lib/javacup10.jar"/> >+ <property name="cupJar" location="${basedir}/lib/javacup10.jar"/> > <description> > Build File for Compiler Project > </description> > >- <taskdef classname="JFlex.anttask.JFlexTask" name="jflex" /> >+ <taskdef classname="JFlex.anttask.JFlexTask" name="jflex" classpath="${basedir}/lib/JFlex.jar" /> > > <target name="generate_parser"> > <jflex file="grammars/xpath.lex" destdir="grammars/generated"/> >- <java jar="${cupJar}" input="grammars/xpath.cup" fork="true" failonerror="true"> >+ <java jar="${cupJar}" input="grammars/xpath.cup" output="${basedir}/state-dump.txt" fork="true" failonerror="true"> >+ <arg value="-parser"/> >+ <arg value="XPathCup"/> >+ <arg value="-symbols"/> >+ <arg value="XpathSym"/> >+ <arg value="-package"/> >+ <arg value="org.eclipse.wst.xml.xpath2.processor.internal"/> >+ <arg value="-dump_states"/> > </java> >+ <copyfile dest="${basedir}/src/org/eclipse/wst/xml/xpath2/processor/internal/XPathCup.java" src="XPathCup.java"/> >+ <copyfile dest="${basedir}/src/org/eclipse/wst/xml/xpath2/processor/internal/XpathSym.java" src="XpathSym.java"/> > </target> > > </project> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
d_a_carver
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 283214
: 141460 |
141461
|
141462
|
141583