Monday, September 01, 2008

關於 ANTLR 的挫折


挫折感真的很大啊...

原來no start rule (no rule can obviously be followed by EOF)的意思是說,

... that Antlr identifies "start" rules (ones that can end with EOF) by looking for rules that are not used anywhere else in the grammar. ...

ANTLR 透過觀察文法中,沒有被任何其他 Rules 採用的,就是 Start Rule。
ANTLRIDE並不能直接看出 Start Rule ,但是 ANTLRWorks 應該可以。