Improved parser error message
Bug #867357 reported by
Nicolae Brinza
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 '$'?)
Related branches
lp:~nbrinza/zorba/error-messages
- Cezar Andrei: Approve
- Nicolae Brinza: Approve
-
Diff: 27986 lines (+3970/-3837)13 files modifiedsrc/compiler/parser/jsoniq_parser.cpp (+1545/-1531)
src/compiler/parser/jsoniq_parser.hpp (+6/-6)
src/compiler/parser/jsoniq_scanner.cpp (+371/-385)
src/compiler/parser/parser.y (+31/-10)
src/compiler/parser/xquery_parser.cpp (+1533/-1519)
src/compiler/parser/xquery_parser.hpp (+6/-6)
src/compiler/parser/xquery_scanner.cpp (+366/-380)
test/rbkt/ExpQueryResults/zorba/parser/syntax-errors/missing-semicolon-06.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/parser/syntax-errors/missing-semicolon-07.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/parser/syntax-errors/missing-semicolon-08.xml.res (+1/-0)
test/rbkt/Queries/zorba/parser/syntax-errors/missing-semicolon-06.xq (+34/-0)
test/rbkt/Queries/zorba/parser/syntax-errors/missing-semicolon-07.xq (+34/-0)
test/rbkt/Queries/zorba/parser/syntax-errors/missing-semicolon-08.xq (+41/-0)
Changed in zorba: | |
milestone: | none → 2.7 |
Changed in zorba: | |
status: | New → Fix Committed |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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( )’: /zorba/ sandbox/ src/compiler/ parser/ xquery_ parser. y:2653: 94: error: ‘class zorba::VarInDecl’ has no member named ‘get_name’ /zorba/ sandbox/ src/compiler/ parser/ xquery_ parser. y:2679: 75: error: ‘class zorba::VarInDecl’ has no member named ‘get_name’
/home/mbrantner
/home/mbrantner