From: Leif-Jöran O. <lj...@ex...> - 2010-01-06 22:15:28
|
Den 2010-01-06 21:17, Wolfgang Meier skrev: >> I'm concerned about some files which were recently committed to the ljo >> branch: >> http://exist.svn.sourceforge.net/exist/?rev=10949&view=rev > > This is an experimental branch and personally I'm not yet sure what > benefits and risks it would have to replace our own grammar. It is a > major change which has to be considered carefully. Yes I have been turning this question back and forwards, outside and in for the last two days since Dmitriy added the xpath grammar part and wanted us to use the full xquery version. > The main problem we > faced during the past year was to migrate our own lexer/grammar from > ANTLR 2 to 3. Among other things, ANTLR 3 would allow us to provide > better error messages (e.g. to finally fix the annoying "expected xyz > found null" messages). Obviously Nikolay managed to use ANTLR 3 to > cover all of XQuery. That's an advantage. But instead of reusing his > grammar, we could also try to learn from what he did. I have been leaning more and more towards this today while working up some steam for getting on with the tree parser for this xqgrammar lexer/parser. The antlr3 inmaturity has bitten us hardest in the tree parser and that is still where most of our needed action is located. The general idea and direction of our own rewrite and Nikolaj's is not that different. > Anyway, the grammar alone doesn't help us much: we would need to > extend it to generate an abstract syntax tree as input for our own > tree parser (which then generates the executable XQuery expression > tree). > We cannot just reuse the code: we need to extend and annotate > it. This makes the license issue more problematic. I totally agree. This will get quite messy with our needed extensions. > Well, I guess we should just get into contact with Nikolay (if this > hasn't happened already) and ask him about his opinion. Agreed. Leif-Jöran |