M0 - Snapshot
The snapshot demonstrates two features, simple token coloring, and multiple errors reporting.
The man behind the nice face of IDE is the nice parser.
The shown snapshot is one script that comes form the w3c XQuery test suite. We can see the errors such as "item_tuple", is not really a error. In fact, the reason is that the "item" is a keyword in the XQuery spec, but the parser treat the keywords and the general variable-style words differently. This will be fixed in M0a recently:)(as done
in OCL^_^) The other hard problem is the XQuery grammar is not the full LALR(k) grammar(?). there are some ambiguities when using the '+' and '*' operators mentioned in w3c recommendation. One solution is to use the backtracking parser, which has been done in the eXQuery and CDT.(the w3c recommendation use a disambiguity rule to solve this problem. It could be considered how to add or we need this rule?)
Frankly, I have underestimated the complexity of the XQuery grammar. I said to Dave the words like "the grammar seem simple" in some communicating email shamelessly^_^. In fact, there are many many tricks in the grammar. To seek the reason, you can see the Martin Probst blog. I've read more and more...
The eXQuery project is a pre-exploring project for my last gsoc effect. The basic goal has been achieved. Now I'm a veteran with XQuery:) Cong! I feels 70% pleased with the semi-ugly XQuery parser. But I feels 95% pleased with the working combination of LPG and IMP. Isn't it cool if you can get one simple IDE for a working language(not toy language!) in one week?!