Nicolae Brinza has proposed merging lp:~nbrinza/zorba/error-messages into 
lp:zorba.

Commit message:
Fixed bug #866958: Parsing error not explicit enough

Requested reviews:
  Nicolae Brinza (nbrinza)
  William Candillon (wcandillon)
Related bugs:
  Bug #855533 in Zorba: "parser error messages should contain the actual value 
of the offending QName"
  https://bugs.launchpad.net/zorba/+bug/855533
  Bug #866958 in Zorba: "Parsing error not explicit enough"
  https://bugs.launchpad.net/zorba/+bug/866958
  Bug #867227 in Zorba: "Confusing error message"
  https://bugs.launchpad.net/zorba/+bug/867227
  Bug #867357 in Zorba: "Improved parser error message"
  https://bugs.launchpad.net/zorba/+bug/867357
  Bug #949064 in Zorba: "The faulty QName should be printed in the parser error 
messages"
  https://bugs.launchpad.net/zorba/+bug/949064
  Bug #997045 in Zorba: "EQName regressions"
  https://bugs.launchpad.net/zorba/+bug/997045
  Bug #1072644 in Zorba: "broken error location"
  https://bugs.launchpad.net/zorba/+bug/1072644

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/144397

Fixed bug #866958: Parsing error not explicit enough
-- 
https://code.launchpad.net/~nbrinza/zorba/error-messages/+merge/144397
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2013-01-14 09:46:44 +0000
+++ ChangeLog	2013-01-22 21:50:28 +0000
@@ -1,6 +1,12 @@
 Zorba - The XQuery Processor
 
 
+version 2.9
+
+Bug Fixes/Other Changes:
+  * Fixed bug #866958  (Parsing error not explicit enough)
+
+
 version 2.8
 
 New Features:

=== modified file 'src/compiler/parser/xquery_parser.cpp'
--- src/compiler/parser/xquery_parser.cpp	2013-01-09 07:27:29 +0000
+++ src/compiler/parser/xquery_parser.cpp	2013-01-22 21:50:28 +0000
@@ -7805,7 +7805,7 @@
     {
             if (static_cast<QName*>((yysemantic_stack_[(8) - (2)].expr))->get_qname() != static_cast<QName*>((yysemantic_stack_[(8) - (6)].expr))->get_qname())
             {
-              error((yylocation_stack_[(8) - (1)]), "syntax error, end tag </" + static_cast<QName*>((yysemantic_stack_[(8) - (6)].expr))->get_qname().str() + "> does not match start tag <"
+              error((yylocation_stack_[(8) - (5)]), "syntax error, end tag </" + static_cast<QName*>((yysemantic_stack_[(8) - (6)].expr))->get_qname().str() + "> does not match start tag <"
                                                    + static_cast<QName*>((yysemantic_stack_[(8) - (2)].expr))->get_qname().str() + ">");
               YYERROR;
             }
@@ -7827,7 +7827,7 @@
     {
             if (static_cast<QName*>((yysemantic_stack_[(9) - (2)].expr))->get_qname() != static_cast<QName*>((yysemantic_stack_[(9) - (7)].expr))->get_qname())
             {
-              error((yylocation_stack_[(9) - (1)]), "syntax error, end tag </" + static_cast<QName*>((yysemantic_stack_[(9) - (7)].expr))->get_qname().str() + "> does not match start tag <"
+              error((yylocation_stack_[(9) - (5)]), "syntax error, end tag </" + static_cast<QName*>((yysemantic_stack_[(9) - (7)].expr))->get_qname().str() + "> does not match start tag <"
                                                    + static_cast<QName*>((yysemantic_stack_[(9) - (2)].expr))->get_qname().str() + ">");
               YYERROR;
             }
@@ -7849,7 +7849,7 @@
     {
             if (static_cast<QName*>((yysemantic_stack_[(9) - (2)].expr))->get_qname() != static_cast<QName*>((yysemantic_stack_[(9) - (7)].expr))->get_qname())
             {
-              error((yylocation_stack_[(9) - (1)]), "syntax error, end tag </" + static_cast<QName*>((yysemantic_stack_[(9) - (7)].expr))->get_qname().str() + "> does not match start tag <"
+              error((yylocation_stack_[(9) - (5)]), "syntax error, end tag </" + static_cast<QName*>((yysemantic_stack_[(9) - (7)].expr))->get_qname().str() + "> does not match start tag <"
                                                    + static_cast<QName*>((yysemantic_stack_[(9) - (2)].expr))->get_qname().str() + ">");
               YYERROR;
             }
@@ -7871,7 +7871,7 @@
     {
             if (static_cast<QName*>((yysemantic_stack_[(10) - (2)].expr))->get_qname() != static_cast<QName*>((yysemantic_stack_[(10) - (8)].expr))->get_qname())
             {
-              error((yylocation_stack_[(10) - (1)]), "syntax error, end tag </" + static_cast<QName*>((yysemantic_stack_[(10) - (8)].expr))->get_qname().str() + "> does not match start tag <"
+              error((yylocation_stack_[(10) - (5)]), "syntax error, end tag </" + static_cast<QName*>((yysemantic_stack_[(10) - (8)].expr))->get_qname().str() + "> does not match start tag <"
                                                    + static_cast<QName*>((yysemantic_stack_[(10) - (2)].expr))->get_qname().str() + ">");
               YYERROR;
             }

=== modified file 'src/compiler/parser/xquery_parser.y'
--- src/compiler/parser/xquery_parser.y	2013-01-09 07:27:29 +0000
+++ src/compiler/parser/xquery_parser.y	2013-01-22 21:50:28 +0000
@@ -4604,7 +4604,7 @@
         {
             if (static_cast<QName*>($2)->get_qname() != static_cast<QName*>($6)->get_qname())
             {
-              error(@1, "syntax error, end tag </" + static_cast<QName*>($6)->get_qname().str() + "> does not match start tag <"
+              error(@5, "syntax error, end tag </" + static_cast<QName*>($6)->get_qname().str() + "> does not match start tag <"
                                                    + static_cast<QName*>($2)->get_qname().str() + ">");
               YYERROR;
             }
@@ -4621,7 +4621,7 @@
         {
             if (static_cast<QName*>($2)->get_qname() != static_cast<QName*>($7)->get_qname())
             {
-              error(@1, "syntax error, end tag </" + static_cast<QName*>($7)->get_qname().str() + "> does not match start tag <"
+              error(@5, "syntax error, end tag </" + static_cast<QName*>($7)->get_qname().str() + "> does not match start tag <"
                                                    + static_cast<QName*>($2)->get_qname().str() + ">");
               YYERROR;
             }
@@ -4638,7 +4638,7 @@
         {
             if (static_cast<QName*>($2)->get_qname() != static_cast<QName*>($7)->get_qname())
             {
-              error(@1, "syntax error, end tag </" + static_cast<QName*>($7)->get_qname().str() + "> does not match start tag <"
+              error(@5, "syntax error, end tag </" + static_cast<QName*>($7)->get_qname().str() + "> does not match start tag <"
                                                    + static_cast<QName*>($2)->get_qname().str() + ">");
               YYERROR;
             }
@@ -4655,7 +4655,7 @@
         {
             if (static_cast<QName*>($2)->get_qname() != static_cast<QName*>($8)->get_qname())
             {
-              error(@1, "syntax error, end tag </" + static_cast<QName*>($8)->get_qname().str() + "> does not match start tag <"
+              error(@5, "syntax error, end tag </" + static_cast<QName*>($8)->get_qname().str() + "> does not match start tag <"
                                                    + static_cast<QName*>($2)->get_qname().str() + ">");
               YYERROR;
             }

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to