santiagopg 02/05/06 10:52:29
Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java
xpath.cup
Log:
Fix for Bugzilla 8041.
Revision Changes Path
1.42 +2 -2
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Parser.java
Index: Parser.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Parser.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- Parser.java 6 May 2002 16:21:22 -0000 1.41
+++ Parser.java 6 May 2002 17:52:29 -0000 1.42
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: Parser.java,v 1.41 2002/05/06 16:21:22 santiagopg Exp $
+ * @(#)$Id: Parser.java,v 1.42 2002/05/06 17:52:29 santiagopg Exp $
*
* The Apache Software License, Version 1.1
*
@@ -952,7 +952,7 @@
try {
_xpathParser.setScanner(new XPathLexer(new StringReader(text)));
- Symbol result = _xpathParser.parse(line);
+ Symbol result = _xpathParser.parse(expression, line);
if (result != null) {
final SyntaxTreeNode node = (SyntaxTreeNode)result.value;
if (node != null) {
1.35 +11 -3
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup
Index: xpath.cup
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/xpath.cup,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- xpath.cup 24 Apr 2002 17:03:15 -0000 1.34
+++ xpath.cup 6 May 2002 17:52:29 -0000 1.35
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: xpath.cup,v 1.34 2002/04/24 17:03:15 santiagopg Exp $
+ * @(#)$Id: xpath.cup,v 1.35 2002/05/06 17:52:29 santiagopg Exp $
*
* The Apache Software License, Version 1.1
*
@@ -92,6 +92,11 @@
private XSLTC _xsltc;
/**
+ * String representation of the expression being parsed.
+ */
+ private String _expression;
+
+ /**
* Line number where this expression/pattern was declared.
*/
private int _lineNumber = 0;
@@ -178,8 +183,9 @@
* compiled in a separate module.
*
*/
- public Symbol parse(int lineNumber) throws Exception {
+ public Symbol parse(String expression, int lineNumber) throws Exception {
try {
+ _expression = expression;
_lineNumber = lineNumber;
return super.parse();
}
@@ -210,7 +216,9 @@
}
public void report_error(String message, Object info) {
- // empty
+ final ErrorMsg err = new ErrorMsg(ErrorMsg.SYNTAX_ERR, _lineNumber,
+ _expression);
+ _parser.reportError(Constants.FATAL, err);
}
public void report_fatal_error(String message, Object info) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]