Improved parser error message

Bug #867357 reported by Nicolae Brinza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Nicolae Brinza

Bug Description

Provide an improved error message for a syntax error reported by the parser:

Given:

       for sm1 in $x/match

I get:

> line 23, column 7: [XPST0003] syntax error, unexpected "'QName'", expecting end of file

A better error message would be:

> unexpected QName (missing '$'?)

Tags: compiler

Related branches

Changed in zorba:
milestone: none → 2.7
Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

This branch has some conflicts with the current trunk. Also, if I merge the trunk, I get the following compile error:

/home/mbrantner/zorba/sandbox/src/compiler/parser/xquery_parser.y: In member function ‘virtual int zorba::xquery_parser::parse()’:
/home/mbrantner/zorba/sandbox/src/compiler/parser/xquery_parser.y:2653:94: error: ‘class zorba::VarInDecl’ has no member named ‘get_name’
/home/mbrantner/zorba/sandbox/src/compiler/parser/xquery_parser.y:2679:75: error: ‘class zorba::VarInDecl’ has no member named ‘get_name’

Changed in zorba:
status: New → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.